phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 2 forks source link

Fix: Metadata Fields retrieval for Shared Groups and Shared Projects [DFCT0010073] #630

Closed ericenns closed 4 weeks ago

ericenns commented 4 weeks ago

What does this PR do and why?

Describe in detail what your merge request does and why.

When launching a Workflow Execution from the Group Samples page when the Samples come from a shared Project or a shared Group. The metadata fields dropdown would not populate. Also when toggling the metadata on the same Group Samples page no metadata would show from the Samples even though they contained it.

This PR adds in a new method metadata_fields to Namespace model with override in Group model. The override in the Group model will query the Shared Groups and Shared Projects to include their metadata fields in the result of the method.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Create a new Group
  2. Share an existing Group with Samples that have metadata to the new Group
  3. Navigate to the new Group Samples page
  4. Verify that metadata is displaying when metadata is toggled.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 4 weeks ago

Simplecov Report

Covered Threshold
92.3% 90%