Child pages
  • "IllegalArgumentException: Passed List had more than one value." when attempting to edit an Agile Board's filter
Skip to end of metadata
Go to start of metadata

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)
...

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.

Help us improve!

2 Comments

  1. The exact cause is still unknown

    Concurrent creates of agile boards of the same name causes this problem readily.

  2. According to the SQL Select statement above, we've got 103 duplicates of this kind in our database. Seeems to be easy to achieve even without JIRA Agile.

    BTW, we get this exception with a different stack trace when one of these duplicates is used in a filter subscription.