Skip to content

Commit

Permalink
Merge pull request DSpace#9280 from DSpace/backport-9276-to-dspace-7_x
Browse files Browse the repository at this point in the history
[Port dspace-7_x] Search on the label of an authority, not the value in a submission context
  • Loading branch information
alanorth authored Jan 23, 2024
2 parents c509d49 + a22a01a commit 5f7af6b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ public Choices getMatches(String query, int start, int limit, String locale) {
int found = 0;
List<Choice> v = new ArrayList<Choice>();
for (int i = 0; i < valuesLocale.length; ++i) {
if (query == null || StringUtils.containsIgnoreCase(valuesLocale[i], query)) {
// In a DCInputAuthority context, a user will want to query the labels, not the values
if (query == null || StringUtils.containsIgnoreCase(labelsLocale[i], query)) {
if (found >= start && v.size() < limit) {
v.add(new Choice(null, valuesLocale[i], labelsLocale[i]));
if (valuesLocale[i].equalsIgnoreCase(query)) {
Expand Down

0 comments on commit 5f7af6b

Please sign in to comment.