Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Percentage of issues moved from status within 30 days of entering that status?

dta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2024

Is there a way to extract a count or percentage that shows how many issues are moved from one status to another within 30 days of being in the first status?

 

I am trying to show data on the project dashboard that displays the number of issues that were moved from a certain status within 30 days of entering that status.  Is it possible to do this within Jira JQL?  If not, what add-ons would allow me to do this?  I have tried manipulating the Time in Status add-on to show this but have been unsuccessful.  If you have any thoughts on how to use the Time in Status add-on or any other features to do this, feel free to share. 

3 answers

1 accepted

4 votes
Answer accepted
Matt Parks
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2024

I only have Jira Software (DC) and I do something similar where I track the time that a work item entered a particular status (based on an Automation rule) and then, when it leaves that status, I fire an even that triggers a script listener that calculates how long it spent in that status and flags the issue as meeting the SLA. That way, I can query on how many issues meet the SLA versus how many don't, which can be displayed on a dashboard.

The script listener/calculation portion requires that Scriptrunner (at least the way that I've implemented it), but I could share the script with you if you have Scriptrunner as well.

dta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2024

Yes, that would be fantastic I'll try out the script.

Matt Parks
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2024
The X-Team SDD Review Updated At field is set to the time when a user executes a transition that automatically sets the value of that field to the current time.
The Architect SDD Approved At Field is set by an Automation rule when a separate field (not included here because it isn't important) has its value set to Approved. In addition to setting the time of the Architect SDD Approved At to {{now}}, the rule also publishes the event that triggers this listener.
import com.atlassian.jira.component.ComponentAccessor
import java.util.Date
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.index.IssueIndexingService;
import com.atlassian.jira.event.type.EventDispatchOption;
import com.atlassian.jira.util.ImportUtils;

def issue = event.issue as MutableIssue

def issueIndexingService = ComponentAccessor.getComponent(IssueIndexingService);
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()

def xTeamSDDReviewField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("X-Team SDD Review Updated At").first()
def archSDDApprovedField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("Architect SDD Approved At").first()
def sddApprovalTimeField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("SDD Approval Time").first()

def xTeamSDDReviewValue = issue.getCustomFieldValue(xTeamSDDReviewField) as Date
def archSDDApprovedValue = issue.getCustomFieldValue(archSDDApprovedField) as Date

if (!xTeamSDDReviewValue || !archSDDApprovedValue)
{
    log.error("One or more fields do not have a value")
    return;
}

def xTeamSDDReviewMillisValue = xTeamSDDReviewValue.getTime()
def archSDDApprovedMillisValue = archSDDApprovedValue.getTime()
def numOfHours =  (archSDDApprovedMillisValue - xTeamSDDReviewMillisValue) / 3600000

numOfHours = numOfHours.round(1)

numOfHours = numOfHours as Double
issue.setCustomFieldValue(sddApprovalTimeField, numOfHours)

ComponentAccessor.getIssueManager().updateIssue(user, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
boolean wasIndexing = ImportUtils.isIndexIssues();
ImportUtils.setIndexIssues(true);
issueIndexingService.reIndex(ComponentAccessor.getIssueManager().getIssueObject(issue.id));
ImportUtils.setIndexIssues(wasIndexing);
Matt Parks
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2024

I didn't include it above, but the script takes the value of those two fields, converts them to milliseconds and calculates the difference between the two, converting to hours (and rounding to the nearest tenth of an hour). Then it updates a custom number field that you can then use in a JQL.

0 votes
Mehmet A _Bloompeak_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 29, 2024

Hi @dta

To get time in status info, you can try Status Time Reports app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.

Here is the online demo link, you can see it in action and try without installing the app. If you have any questions, feel free to schedule a demo with us. We will be happy to help.

For further details, you can have a look at Status Time Reports How to Videos.

App Features:

  • This app has a dynamic status grouping feature so that you can generate various valuable reports as time in status, time in assignee, status entry dates and status counts, cycle time and lead time, resolution time, average/sum reports by any field(e.g. average in progress time by project, average cycle time by issue creation month).
  • You can search issues by Project, Issue Type, Status, Assignee, Issue Creation/Resolution Date(and any other Date field) and JQL Query.
  • Status durations are calculated according to the working calendar you define. Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days.
  • You can set different duration formats.
  • You can export reports in CSV file format and open them in MS Excel.
  • You can also add this app as a gadget to your Jira dashboards and reach “Status Time” from Issue Detail page.
  • You can enable/disable access to Status Time reports&gadgets and Issue Detail page per project, users, groups or project role.

If you are looking for a completely free solution, you can try the limited version Status Time Reports Free.

Hope it helps.

0 votes
Gizem Gökçe (OBSS)
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 29, 2024

Hello @dta ,

You also asked how you can do it with a time in status plugin. Let me answer that for you. 

This result can be achieved with  Timepiece (formerly Time in Status) app, the oldest and leading Time in Status app in Atlassian Marketplace, which is built by my team at OBSS. It is available for both Jira Cloud, and Data Center. 

In the Status Duration report, you can use the Filter option to filter issues by their duration in status. In the example below, I have filtered the results for issues that have been in the To Do and In Progress statuses for less than 30 days. At the top left of the report you will see the total number of issues.  And the rest of the report is the list of issues that meet these filter conditions

Filter 30 days.png

If you wish, you can also schedule a live demo. We will provide a comprehensive overview of the application and address any inquiries you may have.

Hope it helps,

Gizem

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events