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 a requires_study_review field for DataAffiliateAgreements #509

Merged
merged 17 commits into from
Mar 21, 2024

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Mar 15, 2024

  • Add requires_study_review field to DataAffiliateAgreement
  • Move the is_primary field to MemberAgreement and DataAffiliateAgreement, which makes it easier to clean other fields that depend on this field. This involves writing some custom migrations to populate is_primary
  • Move the custom cleaning for is_primary, requires_study_review and additional_limitations to DataAffiliateAgreement.
  • Update code and forms to handle the is_primary change
  • Show requires_study_review indicators in tables and on detail pages, where appropriate.

amstilp added 4 commits March 15, 2024 13:53
Add tests in the DataAffiliateCreate view to verify that you can't
create a DataAffiliate component with the additional_limitations
or requires_study_review=True. These tests are failing - the clean
method isn't working because it is essentially cleaning two models
together, and the DataAffiliateAgreement form instance doesn't have
the signed_agreement field set before the form/formset are saved.
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.66%. Comparing base (750dac6) to head (37d47e9).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
+ Coverage   98.65%   98.66%   +0.01%     
==========================================
  Files         286      291       +5     
  Lines       22454    22773     +319     
==========================================
+ Hits        22151    22470     +319     
  Misses        303      303              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

amstilp added 5 commits March 18, 2024 10:50
This will make the forms easier to process, and also makes some
sense because the NonDataAffiliate type does not differentiate
between primary and components - they are all primary.
Move the additional_limitation and rqeuires_study_review Validation
errors to the specific fields, not the NON_FIELD_ERRORS. This provides
better behavior on the forms.
@amstilp amstilp marked this pull request as ready for review March 19, 2024 20:00
amstilp added 8 commits March 19, 2024 13:41
Include an indicator of whether requires_study_review is true on the
CDSAWorkspace and DataAFfiliateAgreement detail pages.
With is_primary being moved to the agreement type classes, the
detail pages needed to be fixed to show it properly.
Add a field to the DataAffiliateAgreementTable and the CDSAWorkspace
Table to indicate whether study review is required.
This concept no longer exists, since NonDataAffiliateAgreement does
not have an is_primary field. They are all primary.
@amstilp amstilp merged commit 1a713f0 into main Mar 21, 2024
8 checks passed
@amstilp amstilp deleted the feature/cdsa-requires-study-review branch April 22, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant