Collection grant toggle cloning issues
cc @douglassue
Expected behaviour
If user adds a grant to a collection and turns on cloning toggle to apply that grant to all reports added to that collection it should:
- NEVER be removed from existing reports if that grant is deleted at the collection level
- ONLY be applied to NEW reports added to the collection after the grant is added and toggle is turned on
Current behaviour
If user adds a grant to a collection and turns on cloning toggle to apply that grant to all reports added to that collection, is:
- Getting deleted from ALL reports in that collection
- Being added to ALL reports in that collection even if created before the grant was added
Steps to reproduce
Test above with grant - HHSN263201200074I
Priority
Yes, for deployment
Following use cases (already agreed to in scope for deployment BCMS) need to be met for the NAP NIH funded reports:
- NCBI will migrate ~10 NIH contracts to the book metadata for reach NIH funded report, HOWEVER
- NCBI will add the CURRENT NIH contract - HHSN263201200074I- to the NAP NIH Funded collection and add toggle to apply to new reports, AND EXPECTS
- Each NEW report created / linked to that NAP NIH Funded collection will automatically have cloned / applied that CURRENT NIH contract, AND
- OLD PAST reports in that collection will NOT have their Funding information changed (e.g., if the CURRENT NIH contract was not what funded the old report, it won't be automatically added or modified), AND
- If a user makes a mistake or has to add a legacy report NOT funded by the CURRENT NIH contract, the user can turn off the toggle so they can manage that legacy report independently of the toggle to add its accurate funding, and THEN,
- Turn on the toggle again at the collection level for current reports to have the current grant cloned again
And in future, we will need to change the current NIH contract for all NEW reports, at which point, nothing prior to that change should be modified in the particular report book metadata, and only new reports will receive the new grant if toggle is on.