No data shown for 'Customer Request Type' field in issue search page
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
Summary
Some issues don't show values for Customer Request Type on searches but have the value when opening the issue view screen.
Diagnosis
There are duplicated Customer Request Type fields.
This can be confirmed with the following SQL query which will return more than one row:
1
select * from customfield where customfieldtypekey = 'com.atlassian.servicedesk:vp-origin';
id | CUSTOMFIELDTYPEKEY | CUSTOMFIELDSEARCHRKEY | CFNAME | DESCRIPTION |
---|---|---|---|---|
12300 | com.atlassian.servicedesk:vp-origin | com.atlassian.servicedesk:vp-origin-searcher | Customer Request Type | Holds information about which Service Management was used to create an issue. This custom field is created programmatically. Please do not remove. |
12500 | com.atlassian.servicedesk:vp-origin | com.atlassian.servicedesk:vp-origin-searcher | sd.origin.customfield.default.name | Holds information about which Service Management was used to create a ticket. This custom field is created programmatically and must not be modified. |
Cause
The cause for these duplicated fields is not known.
Solution
We need to remove one of the duplicated fields and merge their data.
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
All queries below have been built using the values from the example above. We will choose to keep field 12300 because it has the correct field name (cfname).
Stop Jira
Merging data
There are a few tables we'll need to make sure contain the same data between the fields and moving the values associated to the old field to the new one.
1 2 3 4
update fieldlayoutitem set fieldidentifier = 'customfield_12300' where fieldidentifier = 'customfield_12500' and fieldlayout not in (select fieldlayout from fieldlayoutitem where fieldidentifier = 'customfield_12300');
1 2 3 4
update columnlayoutitem set fieldidentifier = 'customfield_12300' where fieldidentifier = 'customfield_12500' and columnlayout not in (select columnlayout from columnlayoutitem where fieldidentifier = 'customfield_12300');
1
update customfieldvalue set customfield = 12300 where customfield = 12500;;
Updating data
Update the default field used by the application and
1
update propertynumber set propertyvalue = 12300 where id = (select id from propertyentry where propertyentry.property_key = 'com.atlassian.servicedesk:vp-origin');;
Restart Jira
Handling Duplicate Data
ℹ️ It is probable that duplicate rows will exist for the merged field. This process puts all values into the chosen field, even if they are duplicates. This should not cause an error for Jira. Instead, Jira will resolve the conflict by keeping the newest value and discarding the older one(s). This will be logged with at the WARN level like this:
1
More than one value stored for custom field id 'customfield_12300' for issue 'ISS-12345'. Keeping 'xyz' (the newest value) and deleting other values. Original values:[abc, xyz]
Was this helpful?