Inconsistent results when searching issue with different team field value
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
Summary
Searching for the team field value below shows the same issue result even though the team field value was different.
For example:
cf[12611] = 704 AND KEY = TEST-8057
cf[12611] = 707 AND KEY = TEST-8057
Both return the same results.
cf[12611] = Team field
Expected results
Searching the team field shouldn't be showing the same issue because of both different team IDs.
Environment
Jira Software 8.20.10
Diagnosis
You have completed Full Indexing and still encounter the issue.
The affected issue must be a subtask issue type. If yes, please run the following SQL query:
select
(select (select pkey from project where id = project) || '-' || issuenum from jiraissue where id = entity_id) as issuekey,
json_value
from entity_property
where entity_name = 'IssueProperty' and property_key = 'jpo-issue-properties' and json_value like '%team_id%'
and entity_id in (select id from jiraissue where issuenum in (ISSUE_NUM) and project in (select id from project where pkey = 'PROJ_KEY'));
Replace PROJ_KEY to the affected project key => TEST
Replace ISSUE_NUM to the number of the issue key => 8057
If returns results, please proceed with the solution below.
Cause
The subtask issue team value is stored in the entity_property table that causes the searching issue.
Solution
I recommend following the steps below to fix the data in a Test/Dev environment to ensure is working:
- Back up Jira data before proceeding to the next step.
- Stop Jira.
Run the following SQL query to delete the invalid data:
delete from entity_property where entity_name = 'IssueProperty' and property_key = 'jpo-issue-properties' and json_value like '%team_id%' and entity_id in (select id from jiraissue where issuenum in (ISSUE_NUM) and project in (select id from project where pkey = 'PROJ_KEY'));
- Restart Jira.
- Performed a full reindexing.