Page 3 of 3
Re: Time spent on a ticket
Posted: Thu Jan 19, 2012 3:45 pm
by ruffmeister
could you please advise how to make those changes in mysql?
Re: Time spent on a ticket
Posted: Fri Jan 20, 2012 8:41 am
by nickday85
bert blaas wrote:@nickday85
Sorry, maybe it's not so intuitive as I hoped it would be;
When you open a ticket in the administrator area you will find the possibility to add a note;
Total time spent on ticket: 0:00 hours
Notes: + Add note
After you click the +Add note link you will see an extra field to add your text in; the Action / Detail field.
Right underneath that field you will find the text;
Time spent (in minutes)
and underneath that a field with a standard 0 (zero) in it.
Change this 0 into the amount of minutes you want to associate with the text you entered in the Action / Detail field.
After you click the Submit button you will see the total amount of time updated for this ticket.
Hope this helps!
Please let me know if it is still not working.
Omg I'm so stupid. Yeah, it's working ok now...
I was under the impression that it looked at the time the ticket was opened and closed and worked out the difference. I've been trying to implement something like that for ages but my very limited php skills is hindering me somewhat...
Maybe someone here could give that a go? That'd be amazing!
Re: Time spent on a ticket
Posted: Fri Jan 20, 2012 10:28 am
by bert blaas
ruffmeister wrote:could you please advise how to make those changes in mysql?
I assume you have Hesk installed on a hosted server?
(Assuming this, because if it was your private server you probably wouldn't ask)
If you hosting server has something like Plesk or some other central administration page,
you will find some MySql administration there.
If not, then you will need a program like PhpMyAdmin for this. There's plenty of support for that around.
Re: Time spent on a ticket
Posted: Fri Jan 20, 2012 10:35 am
by bert blaas
nickday85 wrote:
I was under the impression that it looked at the time the ticket was opened and closed and worked out the difference. I've been trying to implement something like that for ages but my very limited php skills is hindering me somewhat...
Maybe someone here could give that a go? That'd be amazing!
[/quote]
I'm glad it's working for you now.
And what are you thinking about? A 'Start' and 'Stop' button?
I don't know for sure, but having a ticket open for long time could trigger session time-outs.
(@Klemen; what is your opinion on this?)
On the other hand; there's many of this 'desktop stopwatches' around, have a look at them first.
Re: Time spent on a ticket
Posted: Fri Jan 20, 2012 2:54 pm
by Klemen
When "time spent on ticket" will be officially supported in HESK it will indeed have a "Start"/"Stop" button. Since these buttons would run on Javascript it doesn't depend on the PHP session.
Re: Time spent on a ticket
Posted: Fri Jan 20, 2012 4:03 pm
by ruffmeister
bert blaas wrote:ruffmeister wrote:could you please advise how to make those changes in mysql?
I assume you have Hesk installed on a hosted server?
(Assuming this, because if it was your private server you probably wouldn't ask)
If you hosting server has something like Plesk or some other central administration page,
you will find some MySql administration there.
If not, then you will need a program like PhpMyAdmin for this. There's plenty of support for that around.
i have php mysql but cannot see for the life of me how to create a new field, any add a screenie or a dummis guide?
Re: Time spent on a ticket
Posted: Mon Jan 23, 2012 2:35 pm
by nickday85
bert blaas wrote:
I'm glad it's working for you now.
And what are you thinking about? A 'Start' and 'Stop' button?
I don't know for sure, but having a ticket open for long time could trigger session time-outs.
(@Klemen; what is your opinion on this?)
On the other hand; there's many of this 'desktop stopwatches' around, have a look at them first.
No, what I was thinking was an addition to the script that creates a timestamp when the ticket is closed and works out the difference in time from when it was opened automatically...
Surely that can be done with some sort of function? My php knowledge is VERY limited, but it sounds possible in theory...
Re: Time spent on a ticket
Posted: Thu Jan 26, 2012 9:37 am
by bert blaas
@ ruffmeister;
Google?
http://bytes.com/topic/mysql/answers/56 ... phpmyadmin
@nickday85;
But that would be fully automatic and not be possible to change afterwards.
That is not what my client wants at this time.
I think we will wait for the time functions in the new version by Klemen,
and take it from there.
Re: Time spent on a ticket
Posted: Thu Jan 26, 2012 12:33 pm
by ruffmeister
my phpmyadmin doesnt look like that
can someone advise of the SQL code?
Re: Time spent on a ticket
Posted: Fri Jan 27, 2012 9:45 am
by ictconsulting
Hi Bert,
just to inform you that I got a parse error every time I tryed to edit/modify a post.
syntax error, unexpected T_IF in edit_post.php on line 119
Investigating a bit more I found a missing semicolon at the end of line 117.
Here is the correct code
117 $tmpvar['totalTimeSpent'] = hesk_input($_POST['totalTimeSpent']);
Re: Time spent on a ticket
Posted: Mon Jan 30, 2012 8:19 am
by bert blaas
@ictconsulting
Embarrassing again.
I should do more careful checking before post the 'latest' version,
as I seemed to have that fixed on my private website.
Sorry again, thanks for finding out and reporting!
I have put the latest version on my site
http://www.blaas.cz/help/knowledgebase.php?article=1
and send it again to Klemen too.
Re: Time spent on a ticket
Posted: Mon Jan 30, 2012 3:13 pm
by Klemen
File on the server changed, thanks for sharing your modifications.
Re: Time spent on a ticket
Posted: Sat Apr 21, 2012 3:01 pm
by seanieboy02
Another little mod to the original - doesn't show the field if it's empty... (replace the total time spent on ticket row)
Code: Select all
<?php // Time Spent Total Field - Added just after OWNER
if(!empty($timeTotal)){
?>
<tr>
<td>Total time spent on ticket: </td>
<td><?php echo $timeTotal;?> minutes</td>
</tr>
<?php
} // end of Time Spent Total Field ?>
Apologies for not joining in sooner - been off the grid! Although added some little tweaks like scheduling of tickets and iCal creation amongst others...
@klemen - would it be okay to dm you a link to the current files I've got? Might help with some ideas...
Re: Time spent on a ticket
Posted: Sun Apr 22, 2012 11:39 am
by Klemen
Sure, feel free to PM me the link. Version 2.4 isn't far from beta so I'm not sure much will be added, but I may use some ideas for 2.5 (or 3.0).