Skip to content

fix: thesaurus retrieval from UI when editing a metadata#351

Merged
f-necas merged 1 commit intogeorchestra-gn4.4.xfrom
fix-thesaurus-match-condition
Feb 3, 2026
Merged

fix: thesaurus retrieval from UI when editing a metadata#351
f-necas merged 1 commit intogeorchestra-gn4.4.xfrom
fix-thesaurus-match-condition

Conversation

@f-necas
Copy link
Collaborator

@f-necas f-necas commented Feb 2, 2026

When a thesaurus contains keys which can be contained in another, it may display the wrong key when editing a metadata.

By example, there's two thesaurus keys http://domain.com/mykey/1 and http://domain.com/mykey/12.

Depending on the order in the thesaurus, if I have the first one in my metadata record, geonetwork may answer with the second one.

How to replicate:

  • Import this thesaurus place-test.zip
  • Edit/create a record and add this thesaurus with Test 1 keyword
  • Save and close
  • Check value: Will be ok Test 1
  • Re-edit the record and go to thesaurus part
  • 🚫 The value show will be Test wrong

@f-necas f-necas requested a review from pmauduit February 2, 2026 15:41
Copy link
Member

@pmauduit pmauduit left a comment

Choose a reason for hiding this comment

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

I am not into JS, but I'd have expected that the typeSearch parameter should be set elsewhere so that the filter is used as is / without using wildcards ?

@f-necas
Copy link
Collaborator Author

f-necas commented Feb 3, 2026

I am not into JS, but I'd have expected that the typeSearch parameter should be set elsewhere so that the filter is used as is / without using wildcards ?

The filter is already set without wildcard, and is used inside the q parameter above.

q: filter || "",
uri: (typeSearch === "MATCH" ? filter : "*" + filter + "*") || "",

@f-necas f-necas merged commit 437fce0 into georchestra-gn4.4.x Feb 3, 2026
2 checks passed
@f-necas f-necas deleted the fix-thesaurus-match-condition branch February 3, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants