sgn icon indicating copy to clipboard operation
sgn copied to clipboard

Phenotype upload: option to remove observations

Open dwaring87 opened this issue 9 months ago • 0 comments

Description

Currently, when you upload phenotype observations, there is an option to replace any existing values with values from the upload file. If the value in the file is not blank, it will be used to replace the existing database value. If the value in the file is blank, the existing value in the database is left unchanged.

This PR adds an option (double-disabled by default), that allows the user to remove any existing observations from the database if the value is blank in the upload file.

This adds a remove_values attribute to the CXGN::Phenotypes::StorePhenotypes class (that is disabled by default). Currently, the attribute is only used in the StorePhenotypes instance in the /ajax/phenotype/upload_store endpoint.

Fixes #3017

image

Checklist

  • [ ] Refactoring only
  • [ ] Documentation only
  • [ ] Fixture update only
  • [ ] Bug fix
    • [ ] The relevant issue has been closed.
    • [ ] Further work is required.
  • [ ] New feature
    • [ ] Relevant tests have been created and run.
    • [ ] Data was added to the fixture
      • [ ] Data was added via a patch in /t/data/fixture/patches/.
    • [ ] User-Facing Change
      • [ ] The user manual in /docs has been updated.
    • [ ] Any new Perl has been documented using perldoc.
    • [ ] Any new JavaScript has been documented using JSDoc.
    • [ ] Any new legacy JavaScript has been moved from /js to /js/source/legacy.

dwaring87 avatar May 10 '24 14:05 dwaring87