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

Add COG children picker to forms #5279

Draft
wants to merge 46 commits into
base: issue-114-backend
Choose a base branch
from
Draft

Conversation

CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Sep 17, 2024

Fixes #5185

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add automated tests
  • Add relevant issue to release milestone

Testing instructions

  • go to data entry and select Collection Object Group
  • define a name and select a cogType
  • verify you can create a new CO child and save the CO
  • verify you can save the main COG form
  • verify after refresh the CO child is still there
  • 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
  • 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
  • verify you can save the main COG form
  • verify after refresh the CO child is still there
  • 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
  • verify you can save the main COG form
  • verify after refresh the COG child is still there
  • verify you can delete any children
  • verify you can uncollapse each child
  • verify you can add a parent cojo

@CarolineDenis CarolineDenis added this to the 7.9.8 milestone Sep 17, 2024
Copy link

gitguardian bot commented Oct 4, 2024

️✅ 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.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 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.

@CarolineDenis CarolineDenis changed the base branch from production to issue-114-backend October 4, 2024 16:02
Copy link
Member

@grantfitzsimmons grantfitzsimmons left a 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.

Specify 7 Crash Report - 2024-10-21T19_47_16.967Z.txt

@CarolineDenis CarolineDenis requested review from sharadsw and removed request for sharadsw and melton-jason October 22, 2024 13:27
Copy link
Member

@grantfitzsimmons grantfitzsimmons left a 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:

Screen.Recording.2024-10-23.at.8.31.11.AM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Dev Attention Needed
Development

Successfully merging this pull request may close these issues.

Add UI COG - Part 1 (add and visualize COG in forms)
5 participants