Skip to content
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

optimize ProcessListVRS to reuse existing Hours if possible #154

Closed
davidhabib opened this issue Aug 26, 2015 · 6 comments
Closed

optimize ProcessListVRS to reuse existing Hours if possible #154

davidhabib opened this issue Aug 26, 2015 · 6 comments

Comments

@davidhabib
Copy link
Contributor

When ProcessListJRS calls ProcessListVRS, we delete all Hours that aren't completed or canceled, and then recreate them. Since this happens every time the scheduled job runs, it would be better to reuse existing hours if they still meet the VRS schedule. Not a trivial code change, however.

@davidhabib
Copy link
Contributor Author

In release 3.79, I added code to remove the deleted Hours from the Recycle Bin.

@mpusto
Copy link

mpusto commented Nov 15, 2016

**lurch: add

@LurchTheButler
Copy link

Tracking W-016882

@davidhabib
Copy link
Contributor Author

Another reason to do this optimization is to preserve additional Hours Status changes that the user may have made. For example, if the VRS has a status of Confirmed, but later the user has updated some past Hours to Status=No-Show, we don't want ProcessListJRS to have a side effect of deleting the No-Show Hours, and recreating them with Confirmed.

Also note that ProcessListVRS will look at ALL shifts for the Job, rather than just new shifts added due to a new or updated JRS. So adding a new JRS has a side effect of deleting/recreating Hours that have nothing to do with the new JRS added.

@davidhabib
Copy link
Contributor Author

While investigating this issue, also review where we look at Status, to see if we can do more to support custom Status values.

@judisohn judisohn added this to the Sprint 2016.11b milestone Nov 29, 2016
@njjc njjc closed this as completed in #223 Dec 5, 2016
njjc pushed a commit that referenced this issue Dec 5, 2016
…ments

optimize ProcessListVRS to reuse existing Hours if possible.  Issue #154
@jlantz
Copy link
Contributor

jlantz commented Dec 14, 2016

Included in beta release 3.90 (Beta 3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants