Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[MOD] Batch Ticket Assign

I have successfully created Batch Ticket Assign mod. This modification will add a new sub tab named Unassigned Tickets including its ticket count under the Tickets tab. This sub tab will only appear if you have unassigned ticket, and will disappear if there is no unassigned ticket in your osTicket system.

This is very useful if you want to assign multiple tickets at once to the specified staff simply from the ticket list, without having assign the ticket one by one from its viewticket page.

This MOD applied to 1.6 RC5 version.

image

You can get the modification code from:
Add Batch Ticket Assign Feature into osTicket v1.6 RC5

Hopefully this will be helpful for osTicket community.

Sincerely,
Masino Sinaga

Comments

  • Thanks for the mod. Works great!


    I had to change the code

    </select><font class='error'>&nbsp;*<?=$errors['staffId']?></font>
    </div>
    <div>
    <span >Comments/message for assignee. &nbsp;(<i>Saved as internal note</i>)
    <font class='error'>&nbsp;*<?=$errors['assign_message']?></font></span>
    <textarea name=\"assign_message\" id=\"assign_message\" cols=\"50\" rows=\"7\"
    wrap=\"soft\" style=\"width:60%;\"><?=$info['assign_message']?></textarea>
    </div>
    <input class=\"button\" type='submit' name='batchassign' value='Batch Assign' />



    To

    </select><font class='error'>&nbsp;*<?=$errors['staffId']?></font>
    <br>
    <span >Comments/message for assignee. &nbsp;(<i>Saved as internal note</i>)
    <font class='error'>&nbsp;*<?=$errors['assign_message']?></font></span>
    </div>
    <div>
    <textarea name=\"assign_message\" id=\"assign_message\" cols=\"50\" rows=\"7\"
    wrap=\"soft\" style=\"width:60%;\"><?=$info['assign_message']?></textarea>
    </div>
    <input class=\"button\" type='submit' name='batchassign' value='Batch Assign' />



    To get it too look like your picture.
  • You're welcome. Glad it worked fine also at yours.
    Thanks for the modification.

    Sincerely,
    Masino Sinaga
  • Yea, thanks for posting in my feature request. This was really helpful. I had to make a couple changes to the queries since the Unassigned tab was showing both unassigned tickets + all closed tickets. Is it normal for tickets to be released once they are closed?
  • Hi Elliot,

    Thanks for your feedback. Also, thanks for reminding me about the unassigned tickets + the closed tickets at the Unassigned Tickets tab. I have just realized now, after you let me know about it. :o

    I have changed the related code on my blog (Just FYI, especially for those of you who have implemented it).

    Here was the changes I made regarding your alert:

    Open your \include\staff\tickets.inc.php file, and find this code:
        $qwhere.=' AND ticket.staff_id=0 ';


    then replace with this following code:
        $qwhere.=' AND ticket.staff_id=0 AND ticket.status=\"open\" ';


    Open your \scp\tickets.php file, and find this code:
         'LEFT JOIN '.TICKET_TABLE.' unassigned ON unassigned.ticket_id=ticket.ticket_id AND unassigned.staff_id=0 '. // Modified by Masino Sinaga, Nov 1, 2009


    then replace with this following code:
         'LEFT JOIN '.TICKET_TABLE.' unassigned ON unassigned.ticket_id=ticket.ticket_id AND unassigned.staff_id=0 AND unassigned.status=\'open\' '. // Modified by Masino Sinaga, Dec 3, 2009


    Thanks again for reminding me, Elliot. :)

    Sincerely,
    Masino Sinaga
  • Hi! Thanks for the MOD. For us will be very usefull this combo only shows staff members of the active departament. That means, a manager who's working with this MOD, can select only members for his/her own departament. May be super admin can see all members, but due to avoid errors, it'd be better managers only see his/her department mates. Can you help me? BR
  • Hi Silke,

    Glad to hear your kind feedback, also that MOD is useful for you.

    Well, okay then, here is the modification regarding your request so that MOD will be very useful for you: :D
    - Showing Staff Members of Current Department on Batch Ticket Assign Modification in osTicket v1.6 RC5

    Sincerely,
    Masino Sinaga
  • helo sir

    Good day,

    it seems that your MOD is working but after i clicked the batch assign button it goes to blank page, also ticket assign shows all staffs not only the staff members of a certain department (2 MODs Applied)

    Thanks

    [SELECT staff.staff_id,CONCAT_WS(", ",staff.lastname,staff.firstname) as name FROM iticket_department dept, iticket_staff staff WHERE dept.dept_id=staff.dept_id AND (staff.dept_id IN (1) OR staff.staff_id=15) ORDER BY lastname,firstname ORDER BY lastname,firstname ]

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY lastname,firstname' at line 1

    i'm having this kind of DB error when i applied the second mod (only show staff members)
  • Solution

    @shinshigumi,

    Sorry for the incovenience. That SQL error caused by the double ORDER BY as you can see from the error message.

    Please re-apply again those two related MODs as I have fixed the causes for the SQL error. I also have fixed the blank page error in the original MOD (you can see from the comment section on my blog post for the original MOD).

    Good luck.

    Sincerely,
    Masino Sinaga
  • Hi,

    is it possible if you can reupload the source code? The link is not working. 

    Thank you.

  • This thread is from 2009... and for version 1.6 RC5.  It does not work with current versions. 
Sign In or Register to comment.