-
Notifications
You must be signed in to change notification settings - Fork 18
Case mass-update endpoint. #1231
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
Conversation
c41ccc0
to
2a23bd8
Compare
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.
Then there is the nastier question of case update side effects.
Currently those include:
- assign to self (if unassigned)
- unboost (if boosted)
- unsnooze (if snoozed)
- set status to investigating (if pending)
In this context (batch action, most likely from an admin, in any case not by someone who is specifically trying to work on "that one case"), I think there is an argument for doing 2 and 3 but not 1 and 4.
} | ||
|
||
// If we are trying to mass-assign, we need to check, for each case, that the target user can manage the case. | ||
if req.Action == models.CaseMassUpdateAssign { |
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.
Thinking out loud: I think it's correct to make this check in the backend and let the endpoint accept cases from different inboxes, however I think we may want to restrict the action of (re)assigning cases in batch to the "inbox" view, meaning not allow in the "my cases" view, because doing so would create a level of headaches related to selection of eligible users and error handling that is beyond the scope of what we planned to do, cc @ChibiBlasphem
Oh yes, the side effects are on my to-do, pending discussion on what we want to do. |
875353f
to
eb998ec
Compare
As settled on Slack, for now, the only side effect we want is unboosting the affected cases. This is done. |
ed95571
to
74cb47f
Compare
74cb47f
to
6bcfdeb
Compare
This PR implements an API endpoint to update select case attributes for a large number of cases. So far, the supported actions are:
This is a work in progress. Notably, some heavy optmization must be done form this first draft to avoid hammering the database for all cases in the request.