Skip to content

Conversation

@mandyparson
Copy link
Contributor

@mandyparson mandyparson commented Sep 29, 2025

Overview

What is the feature?

Add support for Associating Citations

While doing this ticket I found that a function of the CollectionAssociationForm wasn't working as expected. When a user is searching for collections to associate, collections that have already been selected should be disabled. But that wasn't happening for two reasons:

  1. no metadata prop was being passed to CollectionAssociationForm
  2. Not all records have a field of associationDetails currently enabled in graphql (the two exceptions are visualizations and citations. Both of these DO have associationDetails in cmr, but those fields are not currently enabled in graphql)

What is the Solution?

Edited the get Citation query

Passed metadata down to CollectionAssociationForm

Changed associationDetails to collections, which achieves the same desired result without having to make changes to graphql.

What areas of the application does this impact?

the get citation query

Testing

Reproduction steps

  • **Environment for testing: SIT
  • **Collection to test with: CIT1200485957-CMR_ONLY
  1. Can add and remove collections from this citation. Make sure pagination works as expected
  2. Step 2...

Attachments

Screenshot 2025-09-29 at 10 05 05 AM

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (27d0e81) to head (4702849).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1411      +/-   ##
==========================================
+ Coverage   97.96%   98.08%   +0.11%     
==========================================
  Files         421      421              
  Lines        6775     6779       +4     
  Branches     1430     1430              
==========================================
+ Hits         6637     6649      +12     
+ Misses        137      129       -8     
  Partials        1        1              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the comment at the top of static/src/js/pages/CollectionAssociationFormPage/__tests__/CollectionAssociationFormPage.test.jsx

@mandyparson mandyparson merged commit 954aa78 into main Oct 2, 2025
7 checks passed
@mandyparson mandyparson deleted the MMT-4058 branch October 2, 2025 18:15
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.

5 participants