osTicket / osTicket-1.7

osTicket-1.7
GNU General Public License v2.0
232 stars 178 forks source link

Exclude non-working hours from SLA #515

Open azimyasin opened 11 years ago

azimyasin commented 11 years ago

This is a suggestion , The SLA definition should have an option to set working hours and on the basis of that due date should be calculated since the working hours of every organization varies.

ntozier commented 11 years ago

All the SLAs I've ever read are based on real time, not on "our business hours", that being said this isn't a bad idea. Smaller organizations may want to write their SLAs based on their staff hours. i.e. The company that I work for IT is only open Mon-Fri, 8am-5pm. Having over due, SLA, and ticket age take those hours into consideration would certainly make our department look better in reports. (ie lower times to first reply, lower close times, etc.)

clarkie2014 commented 9 years ago

This would be ideal for our organisation. (Mon-Fri; 8am-5pm). We can't afford the price of asking osTicket to customise for us (was going to cost thousands of £'s). We may need to resort to a different helpdesk solution.

Does anyone know where to find the code for the SLA's so I can play with it?

ntozier commented 9 years ago

/include/class.sla.php

and of course every ticket open, ticket edit, and the scp sla areas.

simonshtipelman commented 8 years ago

Sorry for bringing this out of the depths but any chance this will be implemented? It would really be helpful because a lot of organizations do not open 24 hours a day and a lot of places have SLAs for business hours only.

I have osTIcket setup at a clients site and it would really be helpful to have ticket not become late over the weekend or during the night when the IT department works Mon-Fri 8am-5pm.

clarkie2014 commented 8 years ago

Hi,

Due to the poor SLA design of osTicket, we moved away from this and now use http://www.esperim.com/product/ost-plus-1-4-2

Cheers


Stephen Clark IT Infrastructure Engineer

[cid:MHCINSIGHTfooter.JPG]

Concern: The Mental Health and Wellbeing Group

T:

0191 217 2936

F:

0191 217 0350

E:

stephen.clark@concerngroup.orgmailto:stephen.clark@concerngroup.org

Mental Health Concern is a registered charity, Insight Healthcare is a not for profit organisation and are part of Concern: The mental health and wellbeing group. Registered Office: Buttress House, 36 Brenkley Way, Seaton Burn, Newcastle upon Tyne, NE13 6DS

Mental Health Concern - Company registered in England & Wales, Reg. Number: 2073465. Registered Charity Number: 519332 Insight Healthcare - Company registered in England & Wales, Reg. Number: 4391008

If you received this communication by mistake, please do not forward it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Many thanks. From: phantomofrussia [mailto:notifications@github.com] Sent: 04 October 2015 19:40 To: osTicket/osTicket-1.7 osTicket-1.7@noreply.github.com Cc: Stephen Clark stephen.clark@concerngroup.org Subject: Re: [osTicket-1.7] Exclude non-working hours from SLA (#515)

Sorry for bringing this out of the depths but any chance this will be implemented? It would really be helpful because a lot of organizations do not open 24 hours a day and a lot of places have SLAs for business hours only.

I have osTIcket setup at a clients site and it would really be helpful to have ticket not become late over the weekend or during the night when the IT department works Mon-Fri 8am-5pm.

— Reply to this email directly or view it on GitHubhttps://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-145372085.

marcomarsala commented 8 years ago

We implemented exactly this feature with a custom plugin for osTicket. We changed calculation and added a CRUD GUI to manage working hours and holiday calendar.

abenjas commented 8 years ago

Any chance to share this plugin?

marcomarsala commented 8 years ago

It isn't a plugin, we implemented this for a customer of mine using custom code in a legacy osTicket installation.

The starting point for modifications is class.ticket.php If you want we can made customizations for you for a reasonable fee. MM

On Wed, Jun 8, 2016 at 7:43 PM +0200, "abenjas" notifications@github.com wrote:

Any chance to share this plugin?


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-224671127

abenjas commented 8 years ago

how much does it cost? and do you have a vat number for an invoice?

clarkie2014 commented 8 years ago

Hi, it’s completely free!

http://www.esperim.com/product/ost-plus-1-4-2

Hope that helps.


Stephen Clark IT Infrastructure Engineer

[cid:MHCINSIGHTfooter.JPG]

Concern: The Mental Health and Wellbeing Group

T:

0191 217 2936

F:

0191 217 0350

E:

stephen.clark@concerngroup.orgmailto:stephen.clark@concerngroup.org

Mental Health Concern is a registered charity, Insight Healthcare is a not for profit organisation and are part of Concern: The mental health and wellbeing group. Registered Office: Buttress House, 36 Brenkley Way, Seaton Burn, Newcastle upon Tyne, NE13 6DS

Mental Health Concern - Company registered in England & Wales, Reg. Number: 2073465. Registered Charity Number: 519332 Insight Healthcare - Company registered in England & Wales, Reg. Number: 4391008

If you received this communication by mistake, please do not forward it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Many thanks. From: abenjas [mailto:notifications@github.com] Sent: 04 July 2016 16:26 To: osTicket/osTicket-1.7 osTicket-1.7@noreply.github.com Cc: Stephen Clark stephen.clark@concerngroup.org; Comment comment@noreply.github.com Subject: Re: [osTicket/osTicket-1.7] Exclude non-working hours from SLA (#515)

how much does it cost? and do you have a vat number for an invoice?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-230313782, or mute the threadhttps://github.com/notifications/unsubscribe/AIkXb91QyWEQZCdT4ymN2MgxEm0KVI-aks5qSSYOgaJpZM4AhNOk.

abenjas commented 8 years ago

Hi,

thanks, I am sorry for the misunderstanding: I know it's free, I was asking for a custom plugin that marcomarsala https://github.com/marcomarsala has implemented: CRUD GUI to manage working hours and holiday calendar. It's seems that popular open source ticket platform are not willing to have a calendar with business hour and holidays. I can't understand why: I can't have overdue tickets on week-end!!! ost+ have business hour but not holiday calendars, Any chances it will be implemented soon?

Best Regards, Jorge Borges

2016-07-04 16:49 GMT+01:00 clarkie2014 notifications@github.com:

Hi, it’s completely free!

http://www.esperim.com/product/ost-plus-1-4-2

Hope that helps.


Stephen Clark IT Infrastructure Engineer

[cid:MHCINSIGHTfooter.JPG]

Concern: The Mental Health and Wellbeing Group

T:

0191 217 2936

F:

0191 217 0350

E:

stephen.clark@concerngroup.orgmailto:stephen.clark@concerngroup.org

Mental Health Concern is a registered charity, Insight Healthcare is a not for profit organisation and are part of Concern: The mental health and wellbeing group. Registered Office: Buttress House, 36 Brenkley Way, Seaton Burn, Newcastle upon Tyne, NE13 6DS

Mental Health Concern - Company registered in England & Wales, Reg. Number: 2073465. Registered Charity Number: 519332 Insight Healthcare - Company registered in England & Wales, Reg. Number: 4391008

If you received this communication by mistake, please do not forward it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Many thanks. From: abenjas [mailto:notifications@github.com] Sent: 04 July 2016 16:26 To: osTicket/osTicket-1.7 osTicket-1.7@noreply.github.com Cc: Stephen Clark stephen.clark@concerngroup.org; Comment < comment@noreply.github.com> Subject: Re: [osTicket/osTicket-1.7] Exclude non-working hours from SLA (#515)

how much does it cost? and do you have a vat number for an invoice?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-230313782>, or mute the thread< https://github.com/notifications/unsubscribe/AIkXb91QyWEQZCdT4ymN2MgxEm0KVI-aks5qSSYOgaJpZM4AhNOk>.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-230317658, or mute the thread https://github.com/notifications/unsubscribe/ACv1GH7UHDgqOjkPGIolK6SfEIQsV-jzks5qSStsgaJpZM4AhNOk .

Jorge Borges

marcomarsala commented 8 years ago

@abenjas, please contact me in private to discuss details. marco.marsala at live.it

norganna commented 7 years ago

For anyone else who arrives here from Google interested in implementing this, this is how we hacked SLA hours into our install: class.ticket.diff.txt

Enjoy!

chrisscotweb commented 6 years ago

Fantastic @norganna thanks for sharing. Still think this would be a great feature - even if it was just as simple as there being an "exclude weekend" config for us meagre small businesses.

Orkanson commented 5 years ago

@norganna can you say me where i have to implement your code?

norganna commented 5 years ago

@Orkanson It's a manual hack I made almost a year ago for the existing code base at the time, you would need to be somewhat familiar with programming languages to implement it. Specifically it needs to be customised to your timezone and support hours.

If you want to take a crack at it regardless, simply open up the diff file I linked. It's a text file, and lists the lines added and removed from the file include/class.ticket.php. You'll probably need to modify the timezone $tzOffset and the work hours $workHours and maybe $workWeek if it's not a standard Monday to Friday work week.

marcomarsala commented 5 years ago

We saw it's possibile to do it with SQL triggers without editing the code.

hans-chen commented 5 years ago

@marcomarsala would you please indicate how to do that by SQL triggers?

marcomarsala commented 5 years ago

You may write a trigger firing on INSERT and overwrite the date, doing all the calculation. This will be resistant to core upgrades too.


Da: Hans Chen notifications@github.com Inviato: lunedì, marzo 18, 2019 12:22 PM A: osTicket/osTicket-1.7 Cc: Marco Marsala; Mention Oggetto: Re: [osTicket/osTicket-1.7] Exclude non-working hours from SLA (#515)

@marcomarsalahttps://github.com/marcomarsala would you please indicate how to do that by SQL triggers?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/osTicket/osTicket-1.7/issues/515#issuecomment-473870938, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFGhVikZmwWzFjITzq1DI9UzxDBp1RaNks5vX3bvgaJpZM4AhNOk.

hans-chen commented 5 years ago

@marcomarsala Thanks, do you mean to overwrite the "created" in table ost_ticket before INSERT? In that case the created date would not be the actual created date?

would you please share the trigger you are using as reference?

MrDeanoB commented 5 years ago

@norganna great manual hack which I have just deployed. However, I have noticed a bit of a challenge and wondered if you'd solved it. It appears that the due date is correctly showing based on working hours but the overdue trigger still appears to be calculating against clock hours. Any thoughts?

MrDeanoB commented 5 years ago

@clarkie2014 I don't suppose you happen to have a copy of the OST+ code. It appears they are no longer actively working on the code and it's no longer available.

MrDeanoB commented 5 years ago

@norganna I think I have found the issue. The checkOverdue SQL statement is not looking at the est_duedate and therefore calculating the SLA against create date against the grace period. I've fixed this and resolved the issue I was having. It's not perfect as I need to fix reopened tickets.

The SQL statement looks like this now:

    $sql='SELECT ticket_id FROM '.TICKET_TABLE.' T1'
        .' USE INDEX (status_id)'
        .' INNER JOIN '.TICKET_STATUS_TABLE.' status
            ON (status.id=T1.status_id AND status.state="open") '
        .' LEFT JOIN '.SLA_TABLE.' T2 ON (T1.sla_id=T2.id AND T2.flags & 1 = 1) '
        .' WHERE isoverdue=0 '
        .' AND (est_duedate is NOT NULL AND est_duedate<NOW()) '
        .' ORDER BY T1.created LIMIT 50';