Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello community!
I installed ScriptRunner on our JSM Cloud to somehow implement the process. We need that in a JWM project (managed by a company) on the board (status) In progress, the current user can only have one task. That is, it can be a condition or a validator in a workflow that prevents a task from being transferred from the To do status to the In progress status for someone if the performer already has a task in In progress.
I'm new to this and don't know how to write a working script. If you have a solution that is feasible without the ScriptRunner app, I would greatly appreciate it!
Hi @Viktoryia K_ ,
If I get you right, you want to avoid users having more than one In Progress task. If a task is already assigned to the user, you'll need to check if the user has another In Progress task before you allow the transition. The way to do that on Jira Cloud – as you already know – are conditions/validators based on Jira Expressions.
Jira Expressions are pretty amazing, but do have some limitations. One of those limitations is that you cannot load additional data via JQL in a condition– you have to make do with what you get in context.
In theory, validators are a bit more flexible: One can actually build validators that run a Forge function to validate a transition after the fact. Again in theory, you could build a validator with Forge that performs the check you want. I am not sure if any apps actually offer something like this currently (April 2024), but I believe ScriptRunner does not currently have a validator like this. I do not work for Adaptavist though, so I might be wrong here.
Of course, you could always build a Forge app yourself that does exactly what you want. It's not complicated at all, especially since there's good documentation and templates available, but it's still coding, so you should be comfortable with JavaScript/TypeScript, if you want to go down that route.
Lastly, there are a few other approaches you could use to achieve a similar result. Personally, I would simply use a filter and a dashboard widget to show me all issues currently in progress and sort them by user. That's not super sophisticated, but would allow me to find any double booked users quickly.
Hope that helps,
Oliver
Hello @Oliver Siebenmarck _Polymetis Apps_
The point is not in tracking, but in the fact that 1 user = 1 task in the In progress status, and no more. The point is to prohibit moving from other statuses to the In progress status if there is this 1 task in the In progress status. I couldn't find a solution through validators, conditions and post-workflow functions, unfortunately.
The application support answer leans towards their database of scripts that are often used in Jira, but there is nothing there that or similar to what I need.
As far as I can conclude now, the only solution is, as you said, to make your own application, but so far it’s difficult for me...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Viktoryia,
I can confirm that ScriptRunner for Jira Cloud Workflow validators use the Jira Expression framework provided by Atlassian.
Using this you would need to write an expression that first checked the status of the current issue was in progress and would then need to get all issues in the project and filter these to check if the status of the issue was in progress and if the asignee on the issue matched the current user and if the number of issues that matched was not greater than 1 issue.
We have some examples in the documentation page here which show how to use Jira expressions that you can use as a guide to help write the expression that you require.
Finally, if you need further assistance then I would advise raising a support ticket here and our support team can assist with writin this expression that you require.
I hope this information helps.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. I understand what you are talking about and I tried to write expressions, but nothing works. I wrote to your support on Friday and hope for their help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Darryl Lee @Kristian Walker _Adaptavist_ @Oliver Siebenmarck _Polymetis Apps_ Guys please us here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.