Time spent on a ticket

Everything related to Hesk - helpdesk software

Moderator: mkoch227

ruffmeister
Posts: 48
Joined: Wed Jun 16, 2010 2:52 pm

Re: Time spent on a ticket

Post by ruffmeister »

could you please advise how to make those changes in mysql?
nickday85
Posts: 9
Joined: Thu Apr 30, 2009 10:06 am

Re: Time spent on a ticket

Post 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!
bert blaas
Posts: 12
Joined: Fri Jan 06, 2012 3:15 pm

Re: Time spent on a ticket

Post 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.
bert blaas
Posts: 12
Joined: Fri Jan 06, 2012 3:15 pm

Re: Time spent on a ticket

Post 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.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: Time spent on a ticket

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
ruffmeister
Posts: 48
Joined: Wed Jun 16, 2010 2:52 pm

Re: Time spent on a ticket

Post 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?
nickday85
Posts: 9
Joined: Thu Apr 30, 2009 10:06 am

Re: Time spent on a ticket

Post 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...
bert blaas
Posts: 12
Joined: Fri Jan 06, 2012 3:15 pm

Re: Time spent on a ticket

Post 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.
ruffmeister
Posts: 48
Joined: Wed Jun 16, 2010 2:52 pm

Re: Time spent on a ticket

Post by ruffmeister »

my phpmyadmin doesnt look like that :-(

can someone advise of the SQL code?
ictconsulting
Posts: 21
Joined: Sun Feb 01, 2009 2:21 pm

Re: Time spent on a ticket

Post 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']);
bert blaas
Posts: 12
Joined: Fri Jan 06, 2012 3:15 pm

Re: Time spent on a ticket

Post 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.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: Time spent on a ticket

Post by Klemen »

File on the server changed, thanks for sharing your modifications.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
seanieboy02
Posts: 5
Joined: Fri Jul 22, 2011 7:30 pm

Re: Time spent on a ticket

Post 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...
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: Time spent on a ticket

Post 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).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply