Timepiece - Time in Status for Jira

How to Build an AI-Powered Blocker Analyzer Using Timepiece Data and Jira Automation

Business Need

You need an automated process that detects when an issue is flagged, gathers its status times data using Timepiece, analyzes the value with Rovo, and automatically posts a comment including a root cause analysis and status duration summary.

Solution

“STATUS DURATION” report type of Timepiece, combined with Jira Automation & Rovo, can be used for this purpose.

Step 1: Configure and Save the Timepiece Report

First, create a Timepiece report...

  • Open the Timepiece reporting page.

  • Select the project in which the support issues reside (Let’s presume you have selected the ABC project).

    • Any filter selection at this point works. The selection made at this stage is not critical, as it will be overridden later during the automation configuration.

  • Switch to the “STATUS DURATION” report type.

  • By default, all statuses are included. If you want to filter by specific statuses, you can select them as shown below.

A Timepiece report view highlighting the Statuses dropdown menu
  • (Optional) Select your business calendar if you have one.

  • Go to settings and save it via "Save report parameters".

    • The parameter set name should be like "ABC Project Status Duration Report".

    • Make sure you select the "Share with everyone" option so others can use the param set as well.

A Timepiece Status Duration report view displaying tracked issues for the ABC Project along with metrics distributed across Backlog, Implementation, Test, Deployment, and Waiting for Customer statuses

Step 2: Create a Jira Automation & Set General Flow Details

Navigate to Jira Automation and start a new rule.
Before configuring the automation logic, you must define the administrative settings in the Flow Details section.

Step 3: Define Trigger and Conditions

Use the “When: Value changes for Flagged” trigger to start the automation whenever an issue is marked as flagged. Since the automation is designed to generate an analysis and add it as a comment under the issue when it becomes blocked, the automation starts with this specific transition.

Jira automation trigger configured for any changes to the Flagged field value

Step 4: Add Action - Timepiece: Run Report

After defining the trigger and conditions, add a “Timepiece: Run Report” action that will fetch the required data from Timepiece.

Adding a new step to the Jira automation flow after the trigger
Selecting the Timepiece Run Report action in the Jira automation flow

Select the report (Parameter Set) you created for this automation in the Report Settings field. Ensure that the report has been previously saved using the “Save Report Parameters” option.

configuring a Field value changed trigger step

Parameter Overrides

Override some report parameters with a custom JSON. We’ll override the report filter so it returns data only for the issue that triggered the automation, defined as ({{issue.key}}). The automation ensures it fetches the status duration for that exact issue rather than a general dataset.

Parameter Overrides: { "filterType": "customjql", "customJql": "key = {{issue.key}}" }

Step 5: Add Log Action (Optional)

Add a Log Action to your flow. This step is necessary if you want to monitor the automation and is helpful for debugging in the event of an error.
This action writes the entire dataset returned from the report as a log output, allowing you to see all available data at once.

Log Message: resultList: {{fetchedTimepieceResultList}}

configuring a Log action step to add the fetchedTimepieceResultList smart value directly to the audit log

Note: For more details about the logging and debugging, see the documentation.

Step 6: Use Agent (Blocker Checker)

In this step, we pass the data from Timepiece directly to the AI agent. Using the prompt we provide, the agent acts as a Senior Project Manager and Data Analyst to perform a detailed root cause analysis by examining both the issue comments and duration data to identify the factors causing the blockage.

The analysis is stored in the {{agentResponse}} variable, so it should be used in the final step.

Selecting the Blocker Checker agent in the Jira automation flow
A Blocker Analyzer automation interface configuring a Use agent action step




{{issue.key}}: Included to ensure the agent identifies and analyzes the correct work item.

{{fetchedTimepieceResultList}}: Provided so the agent can interpret the actual duration data and status transitions.


Sample Agent Prompt

I want you to act as a Senior Project Manager and Data Analyst. Analyze the task with the key {{issue.key}} by strictly following the instructions below, based on the data provided at the very end of this prompt.

### Instructions:

  1. **Current Status Assessment:** Is this issue currently in a "Blocked" status?

  2. **Root Cause Analysis:** Examine the issue comments line by line and clearly explain the reason for the blockage (e.g., technical dependencies, approval processes, missing information, etc.).

  3. **Duration Report Analysis:** Interpret the data in the report. How long has the issue spent in each status? Are there any unusual delays? How does this report correlate with the reason for the blockage? 

---
### Format and Tone Rules:

  • Use a professional, solution-oriented tone with a strong command of technical terminology. 

  • Structure your findings using clear headings and bullet points. 

  • Do not add a title to the comment.

  • Do not include the issue link.

### DATA TO ANALYZE:

{{fetchedTimepieceResultList}}


Step 8: Comment on work item

In the Comment on work item step, we post the final results directly to the issue as a comment. By using the {{agentResponse}} variable, the findings regarding the blockage and the duration data from Timepiece are added directly to the work item.

Add a comment for this automation: {{agentResponse}}

Configuring the Comment on work item step to add the agent response as a comment

Step 9: Enable the Rule

Click the "Turn on rule" button to activate the automation. In this final step, the automation automatically posts the analysis generated by the AI agent as a comment when an issue is flagged.

A Jira issue activity section showing an automated comment from Blocker Checker