Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dsenalik
Copy link
Contributor

@dsenalik dsenalik commented Mar 25, 2025

Bug Fix

Closes #2177

Description

I am sorry, I messed up the ChadoUnitTypeDefault field's discover() function. It should only be discovered for content types based on the featuremap table. Currently it is getting discovered for any table with a fkey to cvterm_id 😱

The fix is simple

Testing?

  1. On this branch, import the genetic and genomic content types
  2. Remove the Unit Type field from Genetic Map
  3. Confirm that "Check for new fields" discovers it and adds it*
  4. Do the same for the Physical Map content type
  5. Discover for the Publication content type. The field should NOT be discovered
  • Note that the original field machine name is genetic_map_unit_type and after removal and discovery it is genetic_map_unittype_id because the discovered machine name is based on the table column name unittype_id, and the original machine name is from the yaml.

@dsenalik dsenalik added bug - confirmed For issues where a core developer has confirmed a bug exists. Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. Easy PR Review 😀 Small easy to review pull request Priority - High Any issue/PR which has a noticable impact on usability of the system + would often be encountered. labels Mar 25, 2025
Copy link
Member

@laceysanderson laceysanderson left a comment

Choose a reason for hiding this comment

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

✅ Code changes make sense
✅ Confirmed that it is no longer discovered on publications.
✅ Confirmed it is discovered on genetic map
✅ Confirmed it is discovered on physical map
✅ Confirmed I could create a genetic map after using discover to add the unit type field
✅ Confirmed I could create a physical map after using discover to add the unit type field

@laceysanderson laceysanderson merged commit 6d395f5 into 4.x Mar 31, 2025
17 checks passed
@laceysanderson laceysanderson deleted the tv4g1-issue2177-unittype-discovery branch March 31, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug - confirmed For issues where a core developer has confirmed a bug exists. Easy PR Review 😀 Small easy to review pull request Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. Priority - High Any issue/PR which has a noticable impact on usability of the system + would often be encountered.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit type should only be discovered for featuremap content types

2 participants