Issue Navigator does not show Select List for Multi-Select Searcher
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Searching for specific values in Multi-Select Custom Field produces inconsistent results
Sorting a list of issues by a Multi-Select Custom Field does not finish or returns an error
This behaviour is only seen in issues created prior to upgrading to 4.3 or beyond
The following appears in the atlassian-jira.log
:
1
/secure/IssueNavigator.jspa [velocity] Could not determine type of iterator in #foreach loop at [0,0] in template templates/plugins/fields/view-searcher/view-searcher-multioption.vm
Cause
During the upgrade, the upgrader placed the literal string value into the customfieldvalue table, instead of the index to the customfieldoption table.
Resolution
To rectify this problem, you first have to identify the custom field that is affected.
a. Go to Administration > Issues > Custom Fields
b. Click the gear icon at the right end of the row corresponding with your malfunctioning custom field
c. Hover your mouse over the 'Configure' link
d. The URL should be displayed along the bottom of your browser window
e. The end of the URL will read customFieldId=<number>. This <number is your Custom Field ID
2. Identify the possible values for this field:
1
select * from customfieldoption where customfield=<idnumber>;
3. The output from that command will look like this:
ID | CUSTOMFIELD | CUSTOMFIELDCONFIG | PARENTOPTIONID | SEQUENCE | customvalue | optiontype | disabled |
---|---|---|---|---|---|---|---|
10030 | 10020 | 10002 | NULL | 2 | Yes | NULL | NULL |
10031 | 10020 | 10002 | NULL | 1 | No | NULL | NULL |
10730 | 10020 | 10002 | NULL | 0 | Not sure | NULL | NULL |
4. The error is that, for issues prior to the upgrade, the stringvalue of the customfieldvalue table uses the literal value from the customvalue field, and not the ID from the ID field. To correct this, UPDATE the customfieldvalue based on this information.
5. There should be one 'UPDATE' query performed for every line in this table, as shown below.
This is a sample query based on the results above. Your query WILL differ from this example.
BACK UP YOUR DATA!! UPDATE queries make permanent, irrevocable changes to your database.
1
UPDATE customfieldvalue SET stringvalue to '10030' WHERE stringvalue = 'Yes' AND customfield = '10020';
1
UPDATE customfieldvalue SET stringvalue to '10031' WHERE stringvalue = 'No' AND customfield = '10020';
1
UPDATE customfieldvalue SET stringvalue to '10730' WHERE stringvalue = 'Not sure' AND customfield= '10020';
For each field presenting this issue, repeat steps 1-5.
Was this helpful?