-
Notifications
You must be signed in to change notification settings - Fork 224
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
EDSC-3909: Fix showing direct collection -> variable associations #1687
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1687 +/- ##
==========================================
+ Coverage 91.91% 91.93% +0.01%
==========================================
Files 724 724
Lines 19339 19344 +5
Branches 4553 4540 -13
==========================================
+ Hits 17776 17783 +7
+ Misses 1427 1426 -1
+ Partials 136 135 -1
|
@@ -17,11 +17,13 @@ import { supportsVariableSubsetting } from './supportsVariableSubsetting' | |||
export const buildAccessMethods = (collectionMetadata, isOpenSearch) => { | |||
const { | |||
granules = {}, | |||
services = {} | |||
services = {}, | |||
variables: collAssociatedVars = {} |
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.
We aren't paying by the character here, spell out your variable names ;)
} = serviceItem | ||
|
||
if (serviceAssociatedVariables.count > 0) { |
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.
If the service has no variables associated with it, does serviceAssociatedVariables
come back as null
or { count: 0, items: 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.
The first test where you moved the variables to the collection level, it still needs to return something for variables because the graphql query is requesting that field. So updating that test to look correct should answer my question
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.
It comes back as { count: 0, items: null }
in the graphql response
Switching to key off of `items` count is more confusing
Overview
What is the feature?
There was a user requested fix to showing the variables associated to the collection in a project utilizing
Harmony
orOpenDap
services. InEDSC-3817
a change was made to include only variables associated to the services of a collection. Instead this ticket updates this business logic to show the variables associated directly to the collection unless there exists variables associated to a service of the collection.What is the Solution?
Tweak business logic in modules for building the access method component
What areas of the application does this impact?
Access methods
Testing
Add a collection to your project which implements
opendap
and orharmony
services. Ensure that on the variables page (selectEdit Variables
on the Configure data customization options) we get a view of all of the variables associated to that collection if there exists no services on that collection which have variable associations.Secondly ensure that for a collection which does contain variables associated to the services those variables are instead shown
This query from gaphql
along with the concept-id as a parameter can be used to validate that the metadata for the collection
does/does not
have either type of association.Attachments
Using
C1996881146-POCLOUD
in the production envsUsing
C1200277763-E2E_18_4
in the SIT envChecklist