"IllegalArgumentException: Passed List had more than one value." when attempting to edit an Agile Board's filter

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

You see a stack trace when trying to edit a filter for an Agile Board. The following is the stack trace (which could also be found in the atlassian-jira.log file):

Cause: 
java.lang.IllegalArgumentException: Passed List had more than one value.
Stack Trace: [hide]
java.lang.IllegalArgumentException: Passed List had more than one value.
at org.ofbiz.core.entity.EntityUtil.getOnly(EntityUtil.java:62)
at com.atlassian.jira.issue.search.OfBizSearchRequestStore.getRequestByAuthorAndName(OfBizSearchRequestStore.java:210)
at com.atlassian.jira.issue.search.CachingSearchRequestStore.getRequestByAuthorAndName(CachingSearchRequestStore.java:173)
at com.atlassian.jira.issue.search.DefaultSearchRequestManager.getOwnedSearchRequestByName(DefaultSearchRequestManager.java:125)
at com.atlassian.jira.bc.filter.DefaultSearchRequestService.validateFilterForUpdate(DefaultSearchRequestService.java:183)
at com.atlassian.jira.web.action.filter.EditFilter.doDefault(EditFilter.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...

Environment

Jira Server/Data Center on any version from 8.0.0

Diagnosis

This problem is caused by multiple filters in JIRA that is having the same name. (filtername column in the database searchrequest table) When JIRA tries to query the database for the filter, it expects only one result. If you have multiple filters with the same name, multiple results are returned, hence the error "PASSED LIST HAD MORE THAN ONE VALUE."  To confirm this, you can run the following SQL query:

SELECT filtername FROM searchrequest GROUP BY filtername HAVING (COUNT(filtername) > 1);

Cause

The exact cause is still unknown. Direct database manipulation or plugins that alter filter data could be the primary suspects.

Resolution

  • The resolution would be to shut down JIRA and rename the duplicate filter names in the database, and restart JIRA after that. E.g:

    UPDATE searchrequest SET filtername = 'new-filter-name' WHERE ID = <ID-of-the-filter>;
    

    (info) Please remember to backup your JIRA database prior to performing any form of UPDATE queries. After updating the database, test if editing the filter in the GreenHopper Agile Board or in the Manage Filters section has no problems.


Last modified on Sep 26, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.