"IllegalArgumentException: Passed List had more than one value." when attempting to edit an Agile Board's filter
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) ...
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);
The exact cause is still unknown. Direct database manipulation or plugins that alter filter data could be the primary suspects.
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>;
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.