clonemeagain / osticket-plugin-responder

Automatically replies to new tickets when your office is closed.
GNU General Public License v2.0
7 stars 7 forks source link

[Feature Request] Public holidays / non-business days #2

Open josemi-ca opened 6 years ago

josemi-ca commented 6 years ago

It would be great if the plugin included an option to set certain M-F dates as public holidays/ non-working days

clonemeagain commented 6 years ago

Hmm, that could get tricky. Might be lazier/easier, to consume an ical feed and let someone else do the calendaring?

This is pretty accurate: http://www.officeholidays.com/ics/subscribe_region.php?tbl_region=victoria&tbl_country=Australia Could pull it apart with https://github.com/u01jmg3/ics-parer via cron.

We use a custom calendar on Google for our office, so we could just use that. Be nifty to include in the response as well: (seperate template for weekends)

Our office is currently closed due to the inebriated excesses of %{holiday_name} and will reopen hungover af on %{next_business_day}.
For critical issues, please phone our designated driver..

Hmm. The alternative to an external calendar would be either a textbox that you would just manually enter every closed day date into and keep up to date yourself.. actually, that's not bad either, consume the ical feed to populate the field, but retain manual control.

20180101: New Year's Day
20180101: Day after New year's
.
.

Could even send an admin alert when there is no more holidays in the list and no ical feed to update from.

Possibilities..

josemi-ca commented 6 years ago

I think the textbox option would be simplest solution. Even if it's not fully automated... manually updating it once a year its not really that much work. Also better compatibility, as it's not always possible to find a local public holidays free API covering all regions

The plugin could just check if the current date matches an stored holiday date, if yes, then autoreply and then if not, just check time as usual.