corsc / pagerduty-gcal Goto Github PK
View Code? Open in Web Editor NEWQuick hack app combining PagerDuty and Google Calendar for business
Quick hack app combining PagerDuty and Google Calendar for business
There was a report of a user that had a multi-day "out of office" setting the started prior to the start of the schedule.
This conflict was not detected.
Lifu/me can work on this as well!
minDays check: it seems to be checking schedule of different persons, not the same person?
from @wulifu2hao
find swap: maybe not just checking conflict between the schedule and the calendar of potentialSwap.User.ID, but also vice versa? (s.checker.checkForConflict(potentialSwap, calendars[conflict.User.ID]))
from @wulifu2hao
1st slot in the period: morning slot usually starts from 7am (23:00 UTC) but the 1st morning slot in your code starts from 00:00 UTC, which prevents it from finding match
from @wulifu2hao
if !s.checker.checkForConflict(conflict, calendars[potentialSwap.User.ID]) {
if !s.checker.checkForConflict(potentialSwap, calendars[conflict.User.ID]) && !s.checker.checkForConflict(conflict, calendars[potentialSwap.User.ID]) {
return potentialSwap
}
This would be the correct way to check conflict
swap suggest: because the introduction of minDays check, now you’re looking at the period which might be in the past, and we should stop suggesting swap to the past
from @wulifu2hao
Currently, one person is suggested as a potential swap more than once.
I believe PD schedules are imported in UTC but Gcal tzs are parsed statically as 00:00:00Z
which causes some issues with morning and afternoon shifts and associated conflicts.
Lifu has a patch for this but I'm just posting it here for tracking.
Ideally users would like to have X days between shifts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.