For my project i have the need to have multiple different types of block i.e. "vendor blocked" "user blocked" "facilities blocked" etc. Currently We use labels to identify each type of blocked with one status that they move into in a single column.
From a Project management prospective i would like to know the length of time each one of these items is blocked.
The only way Jira will track is time in status. And this does not accumulate on how many times the issue became blocked. ( we use aresenal data plane which is not very helpful)
I want to be able to track this with out having to have 15+ "blocked" status to move into and out of making a very messy workflow.
Is there another way via JQL or script runner etc. If so can you give me an example of your solution.
I do not think that there is a Jql solution for this, at least you can't get both duration and count using Jql.
You can write your own script to count how many times issue gets in a status, and calculate time in that status. For instance status counter would be as below. (please bear in mind that I did not test the code).
int statusId = xxx; // where xxx is the status ID of the status that you want to count
List<ChangeItemBean> changeItems = changeHistoryManager.getChangeItemsForField(issue, IssueFieldConstants.STATUS);
int counter = 0;
for(ChangeItemBean changeItem: changeItems) {
if (statusId == Integer.parseInt(changeItem.getTo()) {
counter++;
}
}
return counter;
On the other hand, (as being one of the folks behind Snapbytes), I can introduce commonly used Enhancer Plugin's solutions, for both problems.
Also you can find other solutions but I don't know other app which solves both issues except Script Runner and Enhancer.
I hope it helps
Thank you for the response. I will go test this out and see if it works for what i need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please don't stuck in the code if it does not run as expected. As I mentioned before I did not test it.
But I'll be here to assist if you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.