-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Job for bulk operations on UserTasks #1057
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FyreByrd
commented
Dec 2, 2024
source/SIL.AppBuilder.Portal/src/routes/(authenticated)/projects/[id=idNumber]/+page.server.ts
Outdated
Show resolved
Hide resolved
e5c8c55
to
1c171cf
Compare
I added code to add/remove user tasks when:
|
Changes:
|
Handles multiple potential use cases: - Reassign tasks from one list of users to another. - Delete all tasks for a product/project, optionally limit by user or user role. - Create new tasks, optionally by user or role. - Update tasks, optionally by user or role. (This is the main one used by workflow) In all cases, can be applied to either a single product, or all products within a project. Will also refresh the PreExecuteEntries (i.e. blank-ish ProductTransitions that show the ideal path beyond the current workflow state). Updated `databaseWrites/Projects.ts` and `workflow/index.ts` to use the new code.
Will this result in the desired behavior if a user has multiple roles? What if, for some unfathomable reason, a user is both a project owner and an Author on the same project? As of right now, all tasks for that user in that project will be deleted, regardless of role. Should a user be prevented from having more than one role for a project?
Moved the delete tasks up so that they are properly deleted if the workflow is terminated. Removed unneeded call to create ProductTransitions entries.
68fcaab
to
707310e
Compare
Resolved merge conflicts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Handles multiple potential use cases:
In all cases, can be applied to either a single product, or all products within a project. Will also refresh the PreExecuteEntries (i.e. blank-ish ProductTransitions that show the ideal path beyond the current workflow state).
IMPORTANT:
If a user has more than one role that could apply to a task, one task will be created for each of those roles.