Past Approvers not being displayed after statusworkflow change
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
JIRA Approvers not being displayed after status/workflow change Or Past approver list is not visible
Environment
8.x.x, 9.x.x
Diagnosis
Past Approver lists are not visible -

We also will see a stacktrace in the atlassian-jira.log file like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
[c.a.j.web.component.ModuleWebComponentImpl] An exception occured while rendering the web panel: com.atlassian.servicedesk.frontend-webpack-plugin:approvals-past-web-panel (null)
java.lang.NullPointerException
at com.atlassian.servicedesk.plugins.approvals.internal.webpanel.view.ApprovalsViewDataHelperImpl.getApprovalCategoryColorName(ApprovalsViewDataHelperImpl.java:463)
at com.atlassian.servicedesk.plugins.approvals.internal.webpanel.view.ApprovalsViewDataHelperImpl.getApprovalIssueViewData(ApprovalsViewDataHelperImpl.java:200)
at com.atlassian.servicedesk.plugins.approvals.internal.webpanel.view.ApprovalsViewDataHelperImpl.lambda$getIssueViewApprovalsList$9(ApprovalsViewDataHelperImpl.java:174)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at com.atlassian.servicedesk.plugins.approvals.internal.webpanel.view.
Cause
If a previous status that used to exist is removed, and when user opens a JIRA page that has approver set, JIRA pulls data about that status from the database. Their removal means, that required data is no longer available in the database. JIRA can't access it and shows errors in the panels
Solution
We need to find out the Status ID which got deleted, When user loads the JIRA issue page which has approver set, JIRA tries to search for the same status ID and subsequently, a set of queries are fired in the background
In order to find the queries, we need to change the logging level by following the Knowledge base article - Changing logging level and enable debug package for com.atlassian

Then, run the following query against Jira's database to fetch the related issuesstatus entries
1
SELECT id,pname from issuestatus;
Next, review the atlassian-jira.log file. When the issue page is viewed we get /browse/ api call, so search for /browse/issueid. For example, refer to this snippet:
Query executed when issue is viewed
1
/browse/CR-7592 [c.a.p.a.querydsl.util.LoggingSqlListener] select `AO_56464C_APPROVAL`.`ID`, `AO_56464C_APPROVAL`.`ISSUE_ID`, `AO_56464C_APPROVAL`.`NAME`, `AO_56464C_APPROVAL`.`APPROVE_CONDITION_TYPE`, `AO_56464C_APPROVAL`.`APPROVE_CONDITION_VALUE`, `AO_56464C_APPROVAL`.`CREATED_DATE`, `AO_56464C_APPROVAL`.`COMPLETED_DATE`, `AO_56464C_APPROVAL`.`DECISION`, `AO_56464C_APPROVAL`.`STATUS_ID`, `AO_56464C_APPROVAL`.`SYSTEM_DECIDED` from `AO_56464C_APPROVAL` `AO_56464C_APPROVAL` where `AO_56464C_APPROVAL`.`ISSUE_ID` = 671057
Once we have identified the query from the logs, we need run the query on Jira's database to find out the status ID.
ℹ️ If you are not able to find this entry in the atlassian-jira.log file after enabling the relevant debug logger, you can use the query below to find the same details
1
2
3
4
5
6
7
8
9
10
11
--postgres
-- "CR-7592" is an example. Please replace it with your specific issue in question
select
*
from "AO_56464C_APPROVAL"
where "ISSUE_ID" = (select
j.id
from jiraissue j
left join project p on j.project = p.id
where concat(p.pkey,'-',j.issuenum) = 'CR-7592');
The Example output of this query would be:

From the above result, we can see that the STATUS_ID that we get on query execution is 11502. Now, compare this value against the issuestatus query results and you will see that the Status ID is missing. This indicates that the value was deleted and needs to be recreated in order for the panel to work.
Restoring the Missing Status:
🚩To restore the ID, please perform the below steps :-
⚠️Direct database operations should be done very carefully, so we propose taking full DB backup before making the changes.
Please go to JIRA Administration -> Issues -> Statuses -> Add status and create new status, for example:
Name: dummystatus
Category: To Do
Verify, that the new status is visible in the JIRA's database by executing the following SQL query.
SELECT
*
from
issuestatus
WHERE
pname=
'dummystatus'
;
⚠️ Change the pname according to the new status name you specified in step 1.
Stop JIRA Server.
Backup JIRA's database.
Update the "issuestatus" database table. Update the ID of the freshly created status to match the ID of the invalid, deleted status.
UPDATE
issuestatus
SET
id=11502
WHERE
pname=
'dummystatus'
;
commit
;
⚠️ Change the pname according to the new status name you specified in step 1.
Start JIRA Server.
Browse to the issue to verify if the solution is working.
Was this helpful?