-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add a tool to bulk move prepartions from one node to another #4682
Conversation
Triggered by 2bd5f09 on branch refs/heads/issue-4042
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.
front-end changes thus far look good
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.
looks good, though someone should review the back-end code
specifyweb/frontend/js_src/lib/components/Permissions/definitions.ts
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/Permissions/definitions.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Jason Melton <64045831+melton-jason@users.noreply.github.com>
Co-authored-by: Jason Melton <64045831+melton-jason@users.noreply.github.com>
@specify/dev-testing @specify/ux-testing |
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.
Looking good! Alongside awaiting feedback for #4682 (comment), just some more auditing code to consider.
The Auditlog on the frontend has special code to make the format more readable for users.
Can you add the bulk move audit log action to this array?
specify7/specifyweb/frontend/js_src/lib/components/PickLists/definitions.ts
Lines 39 to 47 in 340bb24
const auditLogActions = [ | |
commonText.create(), | |
commonText.update(), | |
commonText.delete(), | |
queryText.treeMerge(), | |
queryText.treeMove(), | |
queryText.treeSynonymize(), | |
queryText.treeDesynonymize(), | |
] as const; |
The index of each element in this array corresponds to the auditcode on the backend (in this file: https://github.com/specify/specify7/blob/production/specifyweb/specify/auditcodes.py)
Thus, be careful not to change the ordering of any elements and insert the bulkMove action at index 7 (after tree desynonymize).
This will make it so that the bulk move action can be selected in the Action
picklist of an Spauditlog query, and that in the query results, the frontend maps the audit code to a much more readable string instead of 7
.
Triggered by 444eef8 on branch refs/heads/issue-4042
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.
Testing instructions
-
Select a storage node that contains 1 or more preparations
-
Click "Move Items" (Truck icon)
-
Select the new location to move the items to
-
Click "Move items from {Current Location} here" in the toolbar
-
Verify items are moved
Looks good, items moved to the new location (I love the truck icon as well)! I would like Grant to review this one though to make sure this is the expected behavior
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.
🥳
Fixes #4042
Checklist
and self-explanatory (or properly documented)
Testing instructions
Select a storage node that contains 1 or more preparations
Click "Move Items" (Truck icon)
Select the new location to move the items to
Click "Move items from {Current Location} here" in the toolbar
Verify items are moved