Distinguish Affiliation (10000) ID and Curation Panel ID (4000/5000) ID system in the affiliation service
All Affiliations will have an affiliation ID, but if the type is Independent Curation Panel, curation panel ID will be null.
Add validation to check if Independent Curation Panel type has been selected, curation panel ID is left blank. The form should not allow an Independent Curation Panel to have a curation panel ID at this time.
Add validation to check that VCEP's curation panel ID is in the 50000 range, that GCEP's curation panel ID is in the 40000 range, and that Affiliation IDs are in the 10000 range.
Issue Ticket Number and Link
Related to issue #73. Should Close #73.
Checklist Remove any options that are not applicable
[X] I have reviewed the how-to guide and the contributing file.
[X] I have run required code checks and resolved any blockers.
[X] I have created the necessary tests to show my changes are effective and work as intended.
[X] I have thoroughly commented my code, especially in more complex areas.
[X] I have updated any necessary documentation.
Screenshots / Recordings
Attempt to add new affiliation with Independent Curation Panel type and a curation_panel_id value. This should produce the error shown.
This validator also works on existing affiliations if they have a curation_panel_id value, the affiliation type cannot be switched to Independent Curation Panel. The same error is produced when the Save button is selected. Also note that ID's cannot be edited after an affiliation is created.
After selecting GCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown.
After selecting VCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown.
After providing an invalid affiliation_id and selecting "save" the below error is shown.
Description
Issue Ticket Number and Link Related to issue #73. Should Close #73.
Checklist Remove any options that are not applicable [X] I have reviewed the how-to guide and the contributing file. [X] I have run required code checks and resolved any blockers. [X] I have created the necessary tests to show my changes are effective and work as intended. [X] I have thoroughly commented my code, especially in more complex areas. [X] I have updated any necessary documentation.
Screenshots / Recordings Attempt to add new affiliation with Independent Curation Panel type and a curation_panel_id value. This should produce the error shown.
This validator also works on existing affiliations if they have a curation_panel_id value, the affiliation type cannot be switched to Independent Curation Panel. The same error is produced when the Save button is selected. Also note that ID's cannot be edited after an affiliation is created.
After selecting GCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown.
After selecting VCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown.
After providing an invalid affiliation_id and selecting "save" the below error is shown.