-
Notifications
You must be signed in to change notification settings - Fork 36
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 COG children picker to forms #5279
base: issue-114-backend
Are you sure you want to change the base?
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
Triggered by 33a95dd on branch refs/heads/issue-5185
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.
To make this work, I had to manually add CollectionObjectGroupType
records.
INSERT INTO ku_fish.collectionobjectgrouptype (COGTypeID, Name, Type, Version, TimestampCreated, TimestampModified,
CollectionID, CreatedByAgentID, ModifiedByAgentID)
VALUES (1, 'Consolidated', 'Consolidated', 0, '2024-10-21 14:03:04.000000', '2024-10-21 14:03:04.000000', 4, 3, 3);
INSERT INTO ku_fish.collectionobjectgrouptype (COGTypeID, Name, Type, Version, TimestampCreated, TimestampModified,
CollectionID, CreatedByAgentID, ModifiedByAgentID)
VALUES (2, 'Drill Core', 'Drill Core', 0, '2024-10-21 14:03:04.000000', '2024-10-21 14:03:04.000000', 4, 3, 3);
INSERT INTO ku_fish.collectionobjectgrouptype (COGTypeID, Name, Type, Version, TimestampCreated, TimestampModified,
CollectionID, CreatedByAgentID, ModifiedByAgentID)
VALUES (3, 'Discrete', 'Discrete', 0, '2024-10-21 14:03:04.000000', '2024-10-21 14:03:04.000000', 4, 3, 3);
Testing instructions
- go to data entry and select Collection Object Group
- define a name and select a cogType
This could only be done after manually running the SQL command above. This should be solved in #5215, so we need to make sure that is actually resolved.
- verify you can create a new CO child and save the CO
Only if I create it via the childCojos
relationship. The cojo
relationship does not preserve the children on the form.
Screen.Recording.2024-10-21.at.2.07.58.PM.mov
- verify you can save the main COG form
- verify after refresh the CO child is still there
See above for cojo
- verify you can create a new COG child and save the COG
- verify you can save the main COG form
- [] verify after refresh the COG child is still there
See above for cojo
, only preserved for childCojos
- verify you can add one CO child using query builder
- verify you can save the main COG form
- verify after refresh the CO child is still there
- verify you can add several CO children using query builder
Each time I used the QB to return a list of all COs, searching only (any) Catalog Number, I would select a range of results. After selection, an item in the list would always be duplicated (recreated several times).
Screen.Recording.2024-10-21.at.2.28.40.PM.mov
Specify 7 Crash Report - 2024-10-21T19_28_33.009Z.txt
This is an existing issue, but it does affect this component, so I've reported it here:
#5335
- verify you can save the main COG form
- verify after refresh the CO child is still there
See above for cojo
, only preserved for childCojos
- verify you can add one COG child using query builder
- verify you can save the main COG form
- verify after refresh the COG child is still there
- verify you can add several COG children using query builder
Same issue reported above (#5335)
- verify you can save the main COG form
- verify after refresh the COG child is still there
See above for cojo
, only preserved for childCojos
- verify you can delete any children
I had some trouble with this being consistently enforced, as sometimes the children I added wouldn't be saved, but I can't recreate consistently. Would like other @specify/ux-testing members to see if they can identify the issue.
- verify you can uncollapse each child
- verify you can add a parent cojo
I cannot add a parent Cojo. When I try to create a COJO, I can't set it's parent, therefore I see:
BusinessRuleException at /api/specify/collectionobjectgroupjoin/ Both childcog and childco cannot be null.
specifyweb/frontend/js_src/lib/components/FormCells/COJODialog.tsx
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/FormCells/COJODialog.tsx
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/FormCells/FormTable.tsx
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/FormSliders/IntegratedRecordSelector.tsx
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/FormCells/COJODialog.tsx
Outdated
Show resolved
Hide resolved
specifyweb/frontend/js_src/lib/components/FormCells/COJODialog.tsx
Outdated
Show resolved
Hide resolved
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.
In addition to my previous review, I wanted to mention that I can not always delete an item from a COG, and after a refresh it will return:
Screen.Recording.2024-10-23.at.8.30.23.AM.mov
See the save button does not get triggered:
Fixes #5185
Checklist
and self-explanatory (or properly documented)
Testing instructions