-
Notifications
You must be signed in to change notification settings - Fork 29
Add lastModified and selected_concept_doi to elastic search object for search cards #6071
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6071 +/- ##
==========================================
Coverage 74.43% 74.44%
- Complexity 5636 5637 +1
==========================================
Files 386 386
Lines 20196 20201 +5
Branches 2086 2086
==========================================
+ Hits 15033 15038 +5
Misses 4166 4166
Partials 997 997
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| objectNode.set("all_authors", MAPPER.valueToTree(allAuthors)); | ||
| objectNode.set("categories", MAPPER.valueToTree(convertCategories(entry.getCategories()))); | ||
| objectNode.put("archived", entry.isArchived()); | ||
| objectNode.put("selected_concept_doi", MAPPER.valueToTree(selectedConceptDoi)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but it seems like the current intended use of the various ObjectNode.puts is to set a field to a particular non-JsonNode value. To that end, the above variety of put, which sets a field to a JsonNode value, appears to be deprecated:
https://www.javadoc.io/static/com.fasterxml.jackson.core/jackson-databind/2.18.2/com/fasterxml/jackson/databind/node/ObjectNode.html#put-java.lang.String-com.fasterxml.jackson.databind.JsonNode-
Probably better to use a set here.
| return selectedDoi; | ||
| } | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could put this method in Entry instead, it seems like a helper ala Entry.getDefaultConceptDoi.
denis-yuen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with above suggestions
|
Description
UI PR: dockstore/dockstore-ui2#2055
This PR sets the
lastModifiedandselected_concept_doifields of the ElasticSearch object so we can display them in the new search cards.Review Instructions
See dockstore/dockstore-ui2#2055
Issue
#5726
https://ucsc-cgl.atlassian.net/browse/DOCK-2482
Security and Privacy
If there are any concerns that require extra attention from the security team, highlight them here and check the box when complete.
e.g. Does this change...
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install@RolesAllowedannotation