Hey all,Using OST1.9.14, is there now a way to make SLAs ignore weekends and holidays? I saw one other thread on this from 2013, with v1.7, but nothing newer. My boss would like SLAs to automatically ignore weekends and company holidays, and I don't know if that's something available/planned for a near-term release or if I'll have to mod OST.If the latter, is there a relatively painless way? I'd like to offer two checkboxes on the form where you create a new SLA: ignore weekends, and ignore holidays. I can modify the database easily enough, but I don't know all the places such a change would have to be added in the code of OST. Any suggestions would be appreciated. Thanks.

Q: Using OST1.9.14, is there now a way to make SLAs ignore weekends and holidays?A: This is not a feature of osTicket at this time.  This will not be a feature in 1.10 when released and I'm not aware of any plans to implement this for the version after that.

Okay, so if I want it, I'll have to make it. Hopefully this won't be too painful. :) Any thoughts on where to start? The way I see it, I have to do this:* create a table for holidays which can include weekends, identified by the day of the week or a calendar date* add two booleans to the SLA table, one to ignore weekends, the other to ignore holidays* add two checkboxes to the new/edit SLA screens to control the previous item* Add logic to wherever an SLA returns how much time it has left that automatically looks for any holidays/weekends (if the SLA is set to do so) and adds that time to what it returnsI don't know if my boss will want me to spend all that time on this, but if he does, where would I begin? As I said, modifying the database won't be a problem, it's the OST code that is a bit daunting. Thanks.

like this

moderator note: embeded url was: http osticket dot com dot de/forum/thread/621-slas-nach-wochentagen-zuweisen/. Use this URL at your own risk, the content at said url has not be evaluated or endorsed by osTicket. Please note that this URL goes to a German fork of osTicket that is not supported at these forums. (forum moderator: ntozier)

I think your link is broken...

2 years later

I have made a simpler approach to this - have the SLA to ignore weekends - That means put a due date over the weekend for the ticket. Look at this commit (NO PR this time, as it might be developed more for a PR, config options, etc). A quick fix would however be to include this: https://github.com/olekrisek/osTicket/commit/1997eef4f63caafaa0c0a7ddbfcb5c0734791827If you use the PHP tester at http://phptester.net , you can test this code: https://pastebin.com/x0LNdbndExperiment with the dates, to see the result. 

    a year later

    olekeh Hi olekeh, I've tried your implementation, but the system still flags the ticket as overdue after 48 hours, even though the due date has been extended by skipping weekend. Any suggestion on fixing this issue?

    • RBGE replied to this.

      thaihoangcfc I think this counts as necroing a dead thread, but this feature will be part of osTicket 1.14, which is currently in release candidate status. You can download it and try it out, but note that as it's still RC, it's not suitable for a production environment yet.

      Write a Reply...