TripalCultivate / TripalCultivate-Phenotypes

Provides generic support for large scale phenotypic data and traits with importers, content pages and visualizations.
GNU General Public License v3.0
1 stars 0 forks source link

Fixes bug in ontology configuration form #84

Closed reynoldtan closed 5 months ago

reynoldtan commented 5 months ago

Issue #83

Motivation

This bug was identified when fixing getter methods in Traits service as describe in this review comment. https://github.com/TripalCultivate/TripalCultivate-Phenotypes/pull/81#issuecomment-2155314262

What does this PR do?

Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an auomated test to ensure it doesn't return.

  1. Add a validation to inspect the CV values provided for Trait, Method and Unit field for each Genus and ensure that each one is a unique CV value.

Testing

Automated Testing

Please describe each automated test this PR creates and provide a list of the assertions it makes using casual language. Do not just say things like "asserts the array is not empty" but rather say "Ensures that the return value of method X with these parameters is not an empty array".

Includes a test where CV for trait, method and unit field was set to the same value.

Manual Testing

Describe in detail how someone should manually test this functionality. Make sure to include whether they need to build a docker from scratch, create any records, etc.

  1. Access the Ontology and terms configuration form. my site/admin/tripal/extension/tripal-cultivate/phenotypes/ontology
  2. Set the CV for Trait, Method and Unit to the same CV value. It can be all 3 fields or any two fields. image
  3. A form error massage will trigger when all 3 fields or at least 2 fields have the same cv value. image