mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-15 22:13:08 +00:00
Merge pull request #9280 from DSpace/backport-9276-to-dspace-7_x
[Port dspace-7_x] Search on the label of an authority, not the value in a submission context
This commit is contained in:
@@ -156,7 +156,8 @@ public class DCInputAuthority extends SelfNamedPlugin implements ChoiceAuthority
|
|||||||
int found = 0;
|
int found = 0;
|
||||||
List<Choice> v = new ArrayList<Choice>();
|
List<Choice> v = new ArrayList<Choice>();
|
||||||
for (int i = 0; i < valuesLocale.length; ++i) {
|
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) {
|
if (found >= start && v.size() < limit) {
|
||||||
v.add(new Choice(null, valuesLocale[i], labelsLocale[i]));
|
v.add(new Choice(null, valuesLocale[i], labelsLocale[i]));
|
||||||
if (valuesLocale[i].equalsIgnoreCase(query)) {
|
if (valuesLocale[i].equalsIgnoreCase(query)) {
|
||||||
|
Reference in New Issue
Block a user