Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BI-998] - Add tags to traits #95

Merged
merged 13 commits into from
Aug 2, 2021
Merged

[BI-998] - Add tags to traits #95

merged 13 commits into from
Aug 2, 2021

Conversation

ctucker3
Copy link
Contributor

@ctucker3 ctucker3 commented Jul 8, 2021

Some of the tests fail right now because tags were added and the brapi-server needs to be patched. This can still be review before then, I won't merge until the tests pass.

Uses the brapi variable.additionalInfo field to store the tags.

Additions:

  • POST traits with tags
  • PUT traits with tags
  • GET all trait tags within a program
  • Add tags to trait upload

Notes:

  • On the front end, existing tags assigned to the trait are based on lower case matching, and removing all spaces before matching.

See other PRs for this feature:
brapi: Breeding-Insight/brapi#40
sgn: Breeding-Insight/sgn#30
bi-web: Breeding-Insight/bi-web#99

LEFT TO DO:

  • Finish up tests in brapi library once Pete fixes the test server

@@ -55,13 +56,17 @@
@Property(name = "brapi.server.reference-source")
private String referenceSource;
private ObservationDAO observationDao;
private Gson gson;

private String TAGS_KEY = "tags";
Copy link
Member

Choose a reason for hiding this comment

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

could be final static

@@ -36,7 +36,8 @@
SCALE_DECIMAL_PLACES("Scale decimal places"),
SCALE_LOWER_LIMIT("Scale lower limit"),
SCALE_UPPER_LIMIT("Scale upper limit"),
SCALE_CATEGORIES("Scale categories");
SCALE_CATEGORIES("Scale categories"),
TAGS("Tags");
Copy link
Member

Choose a reason for hiding this comment

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

How is tags different from trait lists?

@@ -59,6 +59,8 @@
private DSLContext dsl;
private TraitValidatorError traitValidatorError;

private String FAVORITES_TAG = "favorites";
Copy link
Member

Choose a reason for hiding this comment

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

could be final static

}
}

tags.add(FAVORITES_TAG);
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this favorites tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There should always be a favorites tag as an option. This sends the favorites tag back in the options of tags even if a trait isn't assigned that tag yet.

@ctucker3 ctucker3 merged commit bec44b0 into develop Aug 2, 2021
@ctucker3 ctucker3 deleted the feature/BI-998 branch August 2, 2021 17:04
timparsons pushed a commit that referenced this pull request Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants