Several WARN messages in Jira logs with: Cannot find status with id ... Please remove the unknown status from your time metric configuration

Still need help?

The Atlassian Community is here for you.

Ask the community

Environment

Jira Service Management Data Center or Server

Summary

Suddenly, logs are being populated with errors related to the missing status ID, but the error itself doesn´t provide much information on how to turn around the problem or what to do to fix the errors.

(warning) The known impact for this type of issue is related to JSM - Jira Service Management "only".

Diagnosis

The main pattern of this issue is the error on logs, and then a second confirmation can be done by looking at the second step when executing the query to list the missing status ID's.

2022-07-25 08:04:13,767-0700 http-nio-8080-exec-805 WARN xxxxxxxxx@mydomain.com 111x11111x1 1v5t5nt 10.10.10.11,10.10.10.10,127.0.0.1 /secure/AjaxIssueAction!default.jspa [sla.condition.factory.StatusTimeMetricConditionFactory] Cannot find status with id 10429. Please remove the unknown status from your time metric configuration
  • Query to validate the missing status/statuses:

    SELECT * FROM issuestatus WHERE id in ('id'); 

    (lightbulb) The field 'id' above in the SQL statement is found based  on 'id' we see in the error message, an example is below:

    Example of the error showing the 'id'
    Cannot find status with id 10429.

Cause

This issue happens when there are SLA goals configured to Statuses that are no longer (or have never been) present in this Jira environment.
This may happen on:

  • SLA goals import from other instances with different Statuses (or Statuses Ids)
  • A Status was removed from the Workflow and the Project still has SLA goals referring to it.

Steps to replicate

  1. Create a new status in workflow, and see all needed transactions to it
  2. Move to SLA configuration, create a new SLA (using any rules) to use the new status as a trigger
  3. Move to the workflow, delete transactions and delete the status created in step #1
  4. Now if you try to create a new issue or when you move the SLA page the error will pop up in jira.log files

Solution

  • First, execute the below SQL query to find the SLAs and the corresponding projects impacted by the issue:
select 	
	vp."NAME" PROJECT_NAME,
	tm."ID" SLA_ID,
	tm."NAME" SLA_NAME,
	mc."CONDITION_ID" STATUS_ID
from
	"AO_54307E_VIEWPORT" vp,
	"AO_54307E_METRICCONDITION" mc,
	"AO_54307E_TIMEMETRIC" tm
where
	mc."CONDITION_ID" in ('<id>')
	and mc."TIME_METRIC_ID" = tm."ID"
	and tm."SERVICE_DESK_ID" = vp."ID";

(lightbulb) Replace the <id> field in the SQL statement above with the "id" from the error message mentioned in the "Diagnosis" section.

  • Once you have the list, you can remove the invalid status from the SLAs by using the steps below:
    1. Access the Project Settings.
    2. Open the SLA configuration page.
    3. Edit the SLA/rule.
    4. Remove the invalid status.
    5. Save.
  • After that, verify the logs to make sure the error was cleared.


Last modified on Dec 7, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.