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

Display overview fix (external controlled vocabulary) #11034

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

ffritze
Copy link
Contributor

@ffritze ffritze commented Nov 19, 2024

What this PR does / why we need it:
On the metadata page there can be duplicated / redundant metadata entries. This pull-request fixes an IF-clause in metadataFragment.xhtml to eliminate the redundant display of metadata fields

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this: (from Jim) - I thought I could see the issue if I configured the ORCID script but not the ROR script via the external vocabulary mechanism but trying this on demo/v6.4 isn't showing the problem. I'd suggest testing with no scripts (can add author name/affiliation/id metadata) and with the ORCID/ROR set up on the author field (able to add a person via ORCID lookup and free text, affiliation by ROR and free text) and making sure that those work.
(authorIDandAffilationUsingORCIDandROR.md describes adding both using the authorsOrcidAndRor.json file. ).

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?: included

Additional documentation:

Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good. I added some testing notes - feel free to add/change. I also ask that you remove the entry in the API change log (since it is API only). I'm looking into the build failure - it's a known issue not related to the PR contents.

@@ -7,6 +7,10 @@ This API changelog is experimental and we would love feedback on its usefulness.
:local:
:depth: 1

v6.5
Copy link
Member

Choose a reason for hiding this comment

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

This is only for API changes so I don't think we want an entry here.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the release note is enough. Thanks!

@qqmyers qqmyers added the Size: 3 A percentage of a sprint. 2.1 hours. label Nov 19, 2024
@pdurbin pdurbin added the Type: Bug a defect label Nov 19, 2024
@ffritze
Copy link
Contributor Author

ffritze commented Nov 20, 2024

Hi there, I have just committed a removal from changelog.rst.

@cmbz cmbz added FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) labels Nov 21, 2024
@qqmyers qqmyers self-assigned this Nov 22, 2024
Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

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

@ffritze - in testing at QDR, I think I found a bug - details in the other comment.

src/main/webapp/metadataFragment.xhtml Outdated Show resolved Hide resolved
qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this pull request Nov 22, 2024
@pdurbin pdurbin assigned ffritze and unassigned qqmyers Nov 25, 2024
@ffritze
Copy link
Contributor Author

ffritze commented Nov 26, 2024

@qqmyers Thanks for the bugfix. Could you please upload here your cvocConf.json file so that I can get a better understanding of your environment?

@qqmyers
Copy link
Member

qqmyers commented Nov 26, 2024

This should work. Local copies of the scripts. I think I saw the issue of the missing author name when both the author name and affiliation were text strings. ```
[
{
"field-name": "authorAffiliation",
"term-uri-field": "authorAffiliation",
"js-url": ["https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/ror.js","https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/cvocutils.js"],
"protocol": "ror",
"retrieval-uri": "https://api.ror.org/organizations/{0}",
"allow-free-text": true,
"prefix": "https://ror.org/",
"managed-fields": {},
"languages":"en",
"vocabs": {
"rors": {
"uriSpace": "https://ror.org/"
}
},
"retrieval-filtering": {
"@context": {
"termName": "https://schema.org/name",
"scheme": "http://www.w3.org/2004/02/skos/core#inScheme",
"lang": "@language",
"content": "@value"
},
"scheme": {
"pattern": "http://www.grid.ac/ontology/"
},
"termName": {
"pattern": "{0}",
"params": ["/name"]
},
"@type": {
"pattern": "https://schema.org/Organization"
}
}
},
{
"field-name": "grantNumberAgency",
"term-uri-field": "grantNumberAgency",
"js-url": ["https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/ror.js","https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/cvocutils.js"],
"protocol": "ror",
"retrieval-uri": "https://api.ror.org/organizations/{0}",
"allow-free-text": true,
"prefix": "https://ror.org/",
"managed-fields": {},
"languages":"",
"vocabs": {
"ror": {
"uriSpace": "https://ror.org/"
}
},
"retrieval-filtering": {
"@context": {
"termName": "https://schema.org/name",
"scheme": "http://www.w3.org/2004/02/skos/core#inScheme",
"lang": "@language",
"content": "@value"
},
"scheme": {
"pattern": "http://www.grid.ac/ontology/"
},
"termName": {
"pattern": "{0}",
"params": ["/name"]
},
"@type": {
"pattern": "https://schema.org/Organization"
}
}
},
{
"field-name": "author",
"term-uri-field": "authorIdentifier",
"js-url": ["https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/people.js","https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/cvocutils.js"],
"protocol": "orcid",
"retrieval-uri": "https://pub.orcid.org/v3.0/{0}/person",
"allow-free-text": true,
"prefix": "https://orcid.org/",
"managed-fields": {
"personName":"authorName",
"idType":"authorIdentifierScheme"
},
"languages":"en",
"vocabs": {
"orcid": {
"uriSpace": "https://orcid.org/"
}
},
"retrieval-filtering": {
"@context": {
"personName": "https://schema.org/name",
"scheme": "http://www.w3.org/2004/02/skos/core#inScheme"
},
"personName": {
"pattern": "{0}, {1}",
"params": ["/name/family-name/value", "/name/given-names/value"]
},
"@id": {
"pattern": "{0}",
"params": ["@id"]
},
"scheme": {
"pattern": "ORCID"
},
"@type": {
"pattern": "https://schema.org/Person"
}
}
},
{
"field-name": "depositor",
"term-uri-field": "depositor",
"js-url": ["https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/people.js","https://qualitativedatarepository.github.io/dataverse-external-vocab-support/scripts/cvocutils.js"],
"protocol": "orcid",
"retrieval-uri": "https://pub.orcid.org/v3.0/{0}/person",
"allow-free-text": true,
"prefix": "https://orcid.org/",
"managed-fields": {},
"languages":"en",
"vocabs": {
"orcid": {
"uriSpace": "https://orcid.org/"
}
},
"retrieval-filtering": {
"@context": {
"personName": "https://schema.org/name",
"scheme": "http://www.w3.org/2004/02/skos/core#inScheme"
},
"personName": {
"pattern": "{0}, {1}",
"params": ["/name/family-name/value", "/name/given-names/value"]
},
"@id": {
"pattern": "{0}",
"params": ["@id"]
},
"scheme": {
"pattern": "ORCID"
},
"@type": {
"pattern": "https://schema.org/Person"
}
}
},
{
"field-name": "kindOfData",
"term-uri-field": "kindOfData",
"cvoc-url": "https://demo.skosmos.org/",
"js-url": "https://gdcc.github.io/dataverse-external-vocab-support/scripts/skosmos.js",
"protocol": "skosmos",
"retrieval-uri": "https://skosmos.dev.finto.fi/rest/v1/data?uri={0}",
"allow-free-text": true,
"languages":"en, uk, es, zh, ar, tr, lo, sk, th, pt, hu, pl, de, cs, it, fr, hi, ja, ro, fa",
"vocabs":{
"unesco": {
"vocabularyUri": "http://skos.um.es/unescothes/CS000",
"uriSpace": "http://skos.um.es/unescothes/"
},
"agrovoc" : {
"vocabularyUri": "http://aims.fao.org/vest-registry/kos/agrovoc",
"uriSpace": "http://aims.fao.org/aos/agrovoc/"
}
},
"managed-fields": {},
"retrieval-filtering": {
"@context": {
"termName": "https://schema.org/name",
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
"lang": "@language",
"value": "@value"
},
"@id": {
"pattern": "{0}",
"params": ["@id"]
},
"termName": {
"pattern": "{0}",
"params": ["/graph/uri=@id/prefLabel"]
},
"vocabularyName": {
"pattern": "{0}",
"params": ["/graph/type=skos:ConceptScheme/prefLabel"]
},
"vocabularyUri": {
"pattern": "{0}",
"params": ["/graph/type=skos:ConceptScheme/uri"]
}
}
},
{
"field-name": "LCProjectUrl",
"term-uri-field": "LCProjectUrl",
"js-url": "https://dv.dev-aws.qdr.org/cvoc/local_contexts.js",
"protocol": "localcontexts",
"retrieval-uri": "https://sandbox.localcontextshub.org/api/v1/projects/{0}",
"allow-free-text": true,
"cvoc-url": "https://sandbox.localcontextshub.org/",
"managed-fields": {},
"languages": "",
"vocabs": {
"localcontexts": {
"uriSpace":"https://sandbox.localcontextshb.org/"
}
},
"retrieval-filtering": {
"@context": {
"scheme": "http://www.w3.org/2004/02/skos/core#inScheme"
},
"@id": {
"pattern": "{0}",
"params": [
"@id"
]
}
}
}
]

@ffritze
Copy link
Contributor Author

ffritze commented Nov 27, 2024

@qqmyers In our environment your fix is working correctly. Do I understand it right that in yours it is also running flawlessly? If so, I will accept your changes.

@qqmyers
Copy link
Member

qqmyers commented Nov 27, 2024

Yes - the fix I proposed works in all the cases I've tried.

@ffritze ffritze closed this Nov 27, 2024
@ffritze
Copy link
Contributor Author

ffritze commented Nov 27, 2024

I open it again. I don't know how to approve and proceed.

@ffritze ffritze reopened this Nov 27, 2024
@ffritze
Copy link
Contributor Author

ffritze commented Nov 27, 2024

@qqmyers Should I push your changes into my pull request branch?

@qqmyers
Copy link
Member

qqmyers commented Nov 27, 2024

Yeah - just make the change in your branch. Once it's in I can move things forward (approve the build, move it to ready for QA, etc.)

@ffritze
Copy link
Contributor Author

ffritze commented Nov 27, 2024

@qqmyers It is pushed to my pull request branch. Please do an additional review because I accidentally removed your comprehensive comment regarding your proposed changes.

@qqmyers
Copy link
Member

qqmyers commented Nov 27, 2024

Looks good. The comment is still at #11034 (comment) - just hidden.

Copy link
Member

@qqmyers qqmyers left a comment

Choose a reason for hiding this comment

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

Looks good. Tested at QDR and by @ffritze.

@cmbz cmbz added the FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) label Dec 5, 2024
@pdurbin pdurbin changed the title Display overview fix Display overview fix (external controlled vocabulary) Dec 11, 2024
@pdurbin pdurbin added this to the 6.5 milestone Dec 11, 2024
@ofahimIQSS ofahimIQSS self-assigned this Dec 11, 2024
@ofahimIQSS
Copy link
Contributor

Merging - no issues found during regression testing

@ofahimIQSS ofahimIQSS merged commit 73cc914 into IQSS:develop Dec 11, 2024
1 of 2 checks passed
@ofahimIQSS ofahimIQSS removed their assignment Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect
Projects
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Quirk in overview display when using external controlled variables
5 participants