Commit Graph

241 Commits

Author SHA1 Message Date
jjaffeux 7a3393ae33 fix specs 2020-03-11 02:15:57 +01:00
jjaffeux 45e7b258da FIX: set post_url so calendar events can be clicked from anywhere 2020-03-11 01:56:29 +01:00
Martin Brennan d6bff6cbb7
DEPRECATION: Completely remove user custom field timezone (#6)
The functionality of using a UserCustomField timezone for this plugin has been deprecated for the past few months and existing timezone custom fields have been migrated to the replacement, UserOption.timezone.
2020-03-04 11:49:40 +11:00
Dan Ungureanu 77b90ae1e8
DEV: Add test
Follow-up to abb2729764.
2020-02-21 19:03:32 +02:00
Vinoth Kannan eff4de06ae
FEATURE: display group members by timezone in posts. (#19) 2020-02-06 19:05:06 +05:30
Mark VanLandingham b7e1c83bcf
FIX: All-day event logic fixed (#18) 2020-01-28 11:19:17 -06:00
Régis Hanol 66d0d15983 FIX: use observed dates rather than actual dates 2020-01-20 11:00:18 +01:00
Gerhard Schlager ded650f032 Make rubocop happy 2020-01-16 22:55:21 +01:00
Mark VanLandingham fc7e79a07d
Site setting for all-day event times (#13) 2020-01-16 14:14:57 -06:00
Martin Brennan 84a8f0cc0c
FEATURE: Auto-trash direct replies for post with event that is trashed (#8)
* Auto-trash direct replies for post with event that is trashed
* BUT do not trash posts that are direct replies IF they have their own events
2019-12-17 10:00:32 +10:00
David Taylor 7282babc4d DEV: Make specs reliable across system timezones
`Time.new` returns midnight at the beginning of the day in the system timezone. Time.zone.local makes use of the configured rails timezone (UTC)
2019-12-16 18:03:25 +00:00
David Taylor 5c89023db6 DEV: Temporarily skip flaky test 2019-12-16 16:07:27 +00:00
David Taylor 1e6c2ec589
FEATURE: Improve timezone logic for all-day events (#10)
- Render all-day events from 6am to 6pm local time, so that they appear more logically for users in other timezones
- Set the `nextDayThreshold` to 6am, so that multi-day events in slightly more easterly timezones display the end date correctly
2019-12-16 13:12:09 +00:00
David Taylor ef9f830cea
FEATURE: Display all holidays for the next 6 months (#9)
Previously it would only show the 'next' holiday per region, which makes advance planning difficult
2019-12-16 11:50:29 +00:00
Martin Brennan 7ec34030d3
FEATURE: Allow using core user_options.timezone (#5)
* Make sure plugin works with user_options.timezone AND original custom field
* We will show a deprecation warning in the hbs template if the UserOption.timezone is present in core to ensure people upgrade the plugin.
2019-11-25 10:50:34 +10:00
Krzysztof Kotlarek 7682a802e7 FIX: Freezed time used in update_holiday_usernames_spec.rb should be UTC (#3) 2019-09-11 20:05:47 +10:00
Régis Hanol d6fd8f0370 FEATURE: Add new EnsureConsistency scheduled job
Add a new job that is scheduled twice daily to ensure the consistency of the calendar topic.

In some rare cases, like when a post is moved, the calendar is not properly updated.

Since reacting to a post being moved is hard (we don't have the information of the previous topics),
this job will ensure that the events of each posts in the calendar topic are up to date.
2019-09-10 16:20:46 +02:00
Régis Hanol 8bbf51a187 SPEC: add spec for event_destroyer 2019-09-10 12:32:05 +02:00
Joffrey JAFFEUX ab1bc19a18 FIX: do not attempt to validate a post from a topic with no calendar 2019-08-09 10:14:21 +02:00
Régis Hanol 0a1e734628 DEV: let's not introduce time-based heisentests 2019-08-02 18:14:11 +02:00
Régis Hanol 62c493cf30 FIX: ensure only active users can be on holiday
Follow up on a8a560cc67
2019-08-02 18:05:06 +02:00
Penar Musaraj 44f14b881f Make Rubocop happy 2019-07-30 09:04:10 -04:00
Régis Hanol b1fe4456d0 Various bug fixes and performance improvements
- FIX: update_holiday_usernames wasn't deleting "on_holiday" user custom fields
when no users were on holiday
- FIX: flair wasn't working on mentions when using subfolder
- PERF: only decorateCooked and addPosterIcon if there's at least one user on holiday
- Migration to remove duplicate "on_holiday" user custom fields
- Add unique index for the "on_holiday" user custom field
- Localize the "On Holiday" title
- Add the boolean type to the "on_holiday" user custom field
2019-07-25 18:02:31 +02:00
Régis Hanol daf377d217 FIX: all the specs 2019-05-22 22:58:53 +02:00
Régis Hanol d3dbe13085 FIX: properly delete expired event in calendar-based topics
The 'EnsureExpiredEventDestruction' is now only deleting events in topics with
a [calendar].

REFACTOR: Remove all *_INDEX constants
REFACTOR: UpdateHolidayUsernames job

PERF: Use already cooked version of the post instead of over-cooking it
PERF: Only serialize 'calendar_details' on first post
2019-02-09 01:02:08 +01:00
Joffrey JAFFEUX 01bbad9d9e FIX: do not destroy recurring events 2018-12-28 10:48:13 +01:00
Joffrey JAFFEUX c18108819d
UX: multiple improvements (#2)
- better timezone support
- validation
- recuring events support for static
- full calendar 4.0
2018-12-27 16:48:58 +01:00
Gerhard Schlager 1dcf5f1d22 Apply rubocop rules 2018-12-03 11:01:45 +01:00
Vinoth Kannan 456f1bced7 DEV: Include timezone while parsing local-dates event 2018-10-16 06:00:27 +05:30
Vinoth Kannan b5063d195c Add calendar_details method for post and fix the build 2018-10-15 19:30:17 +05:30
Vinoth Kannan e86497a3a4 Rename discourse-simple-calendar to discourse-calendar 2018-09-17 17:19:46 +05:30
Vinoth Kannan 3cb3bb0e2e Rename site setting holiday calendar post id to topic id 2018-09-14 19:33:36 +05:30
Vinoth Kannan 01e874a48d SPEC: Add test method for ensure_expired_event_destruction job 2018-09-14 10:10:05 +05:30
Vinoth Kannan 4c9d42ecc2 SPEC: Add test methods for update_holiday_usernames job 2018-09-14 09:48:11 +05:30
Vinoth Kannan 47cca80290 Fix the incorrect spec methods 2018-09-07 00:34:10 +05:30
Vinoth Kannan 0df19fbc5a Merge branch 'general-cleanup' 2018-09-06 23:57:59 +05:30
Vinoth Kannan 01f0c48784 SPEC: Include seconds in time format 2018-09-06 18:51:33 +05:30
Vinoth Kannan 0aa14333e5 minor fixes and refactoring 2018-09-06 12:52:05 +05:30
Joffrey JAFFEUX 752110ab94 FIX: ensures event and post destruction 2018-06-11 22:53:28 +02:00
Joffrey JAFFEUX 30099a14bc FEATURE: better handling of dates with no time 2018-06-11 15:35:10 +02:00
Joffrey JAFFEUX 3d311d8860 first commit 2018-06-06 15:24:56 +02:00