- Edited
I got things working except for one thing.In the 'my tickets' display, I do not see the time spent column:I have double-checked all the code and where it is suppose to be and all seems correct.Please advise,
I got things working except for one thing.In the 'my tickets' display, I do not see the time spent column:I have double-checked all the code and where it is suppose to be and all seems correct.Please advise,
I got things working except for one thing. In the 'my tickets' display, I do not see the time spent column: I have double-checked all the code and where it is suppose to be and all seems correct. Please advise,
this is the code for spend column:
/include/staff/tickets.inc.phpnear line 204 Remplace this code: .' ,ticket.status,ticket.source,ticket.isoverdue,ticket.isanswered,ticket.created ';by this ode: .' ,ticket.status,ticket.source,ticket.isoverdue,ticket.isanswered,ticket.created,ticket.time_spent ';near line 331 rempleace this code: <th width="180"> <a <?php echo $name_sort; ?> href="tickets.php?sort=name&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Name <?php echo $negorder; ?>">From</a></th>with this code: <th width="120"> <a <?php echo $name_sort; ?> href="tickets.php?sort=name&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Name <?php echo $negorder; ?>">From</a></th> <th width="160">Time Spent</th>near line 428 after this code:<td nowrap> <?php echo Format:($row,22,strpos($row,'@')); ?> </td> add this code:<?php require_once(INCLUDE_DIR.'class.ticket.php'); ?> <?php $ticket= new Ticket($row); ?> <?php $the_time_spent = $ticket->getTimeSpent(); ?><td nowrap><?php echo $the_time_spent;?> </td>
That is perfect...that worked great.Thank you for your help!
That is perfect...that worked great. Thank you for your help!your welcome!
for those that are cosmetically concerned:in the tickets.inc.php on line 456 you can change this line<td colspan="7">to<td colspan="8">to get rid of the darker gray spot at the end of the bottom column underneath the tickets...
Thank you!
I just added the mod in 1.9 and now i dont even see my tickets anymore...The system still says open tickets (2) but in the table it shows: There are no tickets here. (Leave a little early today). And i dont see the time spend column, so my guess is i have not placed your code at the correct places due the guide not being 100% correct anymore. Even some of your stated lines dont match anymore in 1.9 and the text you say we need to look for (example: on line 429 find X, X is not there). so this is all getting best guess work... please update this, or get the developers to add this function native!
This mod was not written or intended to be used with 1.9. I recommend that you revert to stock.
Only tested osTicket-v1.8.1.2 => Time Spent mod with on-call tracking for on-call duty employee.I currently added an on-call tracking for an on-call duty person.A lot of company do have an on-call person\field tech and needs to track it's time to get paid. And an on-call person could use some help from it's team. The person who help the on-call person can also record it's own minutes.When you view the ticket it will show the on-call person's time spent and total ticket time spent.IF someone else helps the on-call person to resolve the ticket. The second employee's name will appear below the time spent with the on-call person.The inserted image below is a sample of working Time Spent with on-call duty.Ticket is assigned to the on-call person and enter it's time spent.The person who helped the on-call person can also add it's own time spent. If the image does not show below hit the link.http://bit.ly/1k7lbv6In the "Advance Search" -> I added a new search area for the on-call person. The search result will only output the tickets that are tagged "on-call" for a selected employee. I currently built this for 3 on-call duty employees, the coding is designed for 3 employees only. I want to share it when it's ready. Meaning it will use the staff table with added column and on-call duty feature will only get activated during a specified date/time. This will avoid entering minutes for on-call during non on-call hours/days. And still working a better export format after the search.BTW: If you guys think this is useful I can start a new thread or keep it in this thread.Cheers :)
to print the spend time on the tickets you need to modified this file class.pdf.php
I dont's use the SLA and i remplace this fileld on this report.
near line 216 rempleace this original code:
$this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, 'SLA Plan', 1, 0, 'L', true); $this->SetFont(''); $sla = $ticket->getSLA(); $this->WriteCell($c, 7, $sla?$sla->getName():' -- ', 1, 0, 'L', true);
with this code:
$this->SetFont('Arial', 'B', 11); $this->WriteCell($l, 7, 'Time Spend', 1, 0, 'L', true); $this->SetFont(''); $the_time_spent = $ticket->getTimeSpent(); $this->WriteCell($c, 7, $the_time_spent, 1, 0, 'L', true);
and you can print tickets with the spend time.
Only tested osTicket-v1.8.1.2 => Time Spent mod with on-call tracking for on-call duty employee. I currently added an on-call tracking for an on-call duty person. A lot of company do have an on-call person\field tech and needs to track it's time to get paid. And an on-call person could use some help from it's team. The person who help the on-call person can also record it's own minutes. When you view the ticket it will show the on-call person's time spent and total ticket time spent. IF someone else helps the on-call person to resolve the ticket. The second employee's name will appear below the time spent with the on-call person. The inserted image below is a sample of working Time Spent with on-call duty. Ticket is assigned to the on-call person and enter it's time spent. The person who helped the on-call person can also add it's own time spent. If the image does not show below hit the link. http://bit.ly/1k7lbv6 In the "Advance Search" -> I added a new search area for the on-call person. The search result will only output the tickets that are tagged "on-call" for a selected employee. I currently built this for 3 on-call duty employees, the coding is designed for 3 employees only. I want to share it when it's ready. Meaning it will use the staff table with added column and on-call duty feature will only get activated during a specified date/time. This will avoid entering minutes for on-call during non on-call hours/days. And still working a better export format after the search. BTW: If you guys think this is useful I can start a new thread or keep it in this thread. Cheers :)i need this you finish this or is example, i need to track the time spend by tech.
Excellent Modhow would I add total time spent to Template ticket Response/Reply?
can anyone edit the mod to make it work with 1.9.2 ?i can't download file of johanbroersma that said it work on 1.9.2
I am actually running 1.9.1 at the moment. Have not tested on 1.9.2
We're in a 1.8 section but since the topic has been raised, I've got it working on 1.9.2 on this thread
http://forum.osticket.com/d/discussion//time-spent-manual-mod#latest
Here's a bit different approach for those who want. Instead of Table Alterations I created a new table and linked. I have Total Time Spent on each ticket at top / each reply/internal note that has a time entry attached it will show how much on each entry response. As well as time entry's you can specify what type of time was done, ie: travel, programming, etc. I needed to hurry up and get this going but I will advance it more as I go and if people have suggestions / additions I am more than happy to apply (if they feasible).Attached is the ZIP of the Files, DB Alteration, and README. Let me know if any issues.
cgregory,Any way to have a report show the details of the ticket and the time each technician spent on the account? Very interested in this...
If I understand right it already has what your asking. In the first screen shot at the bottom it shows the 15 minutes for programming, sorry I should have done multiple entry's to show it in action. For every entry it will show the time that tech entered for that entry. The top is the only location where it will show total time (tally of all time entry's).
Is this what your asking?
cregory,That would work - but just like you said with the total time. If one person worked on a ticket then you should show total time. But if you had mutiple people working on the ticket you could have somethink like:Total Time: 2 hrsJohn: 1.5 hrsZach: .5 hrs