-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(check-monitored-trip): advance to next trip day when itinerary is no longer valid #284
base: dev
Are you sure you want to change the base?
Conversation
… no longer monitored on a day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minors, but apart from them, all good.
import java.util.Locale; | ||
import java.util.Map; | ||
import java.util.Set; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use explict imports. Can you revert this please. There is also a setting in Intellij (assuming you are using this) that prevents this.
@@ -771,6 +764,33 @@ public boolean shouldSkipMonitoredTripCheck(boolean persist) throws Exception { | |||
return true; | |||
} | |||
|
|||
// Check if previous matching itinerary day is still valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to a method comment. Start with /**
and end with */
Calendar calendar = Calendar.getInstance(); | ||
calendar.setTime(previousMatchingItinerary.startTime); | ||
|
||
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. You could in-line this variable.
Checklist
dev
before they can be merged tomaster
)Description
After submitting a trip with certain monitored days, the next trip can be shown on a day that is not monitored. Adds a check on the previous matching itinerary against days the trip should be monitored.