Hello guys,
I am trying to use jira automation rules to prevent user having more than one issue assigned to him/her at "In Development" status. I used the JQL to return results count
assignee = currentUser() AND status = "In Development"
but cannot figure out how i can store that piece of information to use with IF condition. The workflow validator is not helping me to apply this rule.
your help would be highly appreciated, thank you
Possible? Yes - Recommended? Probably not
I can see why you want to do this - to show when a user is working on each Issue. But I wouldn't do that using Assignee, as it makes things more difficult to plan (eg. work a user is expected to work on, work a user is currently working on, etc), but also makes it difficult when context switching - for example...
^ It won't be the best user experience.
---
Instead, I'd use statuses to measure action vs wait time, which you can then calculate instead - for example...
It might not be exactly like this of course, it depends on your workflow and reporting needs (eg. flow efficiency, cycle time, lead time, etc).
---
But if you want to do this using Automation, here's how you could do it...
Text for Comment Action:
[~accountid:{{initiator.accountId}}]
This user already has an issue assigned to them, so this was unassigned.
Please ensure user has no other issues assigned to them before assigning this one.
---
This rule:
A few notes...
---
Let us know your thoughts :)
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't really do this with Automation - it can't block actions, it can only react to an event and do something as a result of it.
You can't do it with a validator or a condition either - these prevent transitions in a workflow, but assigning someone to be the person currently responsible for getting something done is an action, not a workflow transition (although you can include it in a transition)
The only thing you could do is have an automation or listener pick up "issue assigned" check the numbers, and change the assignee back to what it was before.
I would not bother with this - it's unhelpful and confusing for the users: "hey, I assigned that to Bob, why is it not assigned to them now?"
I would instead look at your processes. One of the main reasons to use an issue tracker is to assign people to get stuff done. Why should someone not have more than one issue assigned to them?
Assignee is not "currently working on", it's "this person is the one who is responsible for getting this done".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you @Nic Brough -Adaptavist- for your reply, yes it makes sense what you said. Usually the developer is not working on number of tasks at the same time, also this affects our report how many hours he spent at "In Development" stage. Limit number of tasks to one task at the time makes things measurable, also the developer will be fully aware that he needs to finish this task before jumping to the next one. i found in the app marketplace tools solving this issue using jira expression but is not worthy to pay monthly to handle one case only.
i am wondering why Jira is not enabling their expression language in the workflow until now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Limiting the assignee does not make any sense, it does not help you make anything measurable, and makes it more difficult to plan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agreed with @Nic Brough -Adaptavist- recommendation. In my opinion - To prevent a user to get assigned to an issue should be controlled by business process.
Both automation (it is based on event - cannot stop an action) and WF validator (it is based on wf transition to block the transition if it fails the validation) are not practical solutions.
At a high-level, there may be a idea where if you restrict issue assigning action only via WF transition. So if the condition for the validator fails, the issue remains unassigned + the WF transition are not executed.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Qais Alkhatib
You can add action Lookup Issues, and configure it to search for issues, that fit to your query. After that, you can use smart value like {{lookupIssues.size}} to get number of found issues.
But it's unclear to me, how you're trying to solve question with assigning.
Automation rules don't prohibit actions, they are working after events happened, not before them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indeed. The only thing you can do is to set the assignee to unassigned to undo what was just done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you @Evgenii for your reply, you are right, automation rules won't help in this case, but i could not find a way how to implement in workflow validator, there is JQL validation option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can make workaround. If number of issues (selected with Lookup Issues action) is larger than X, then un-assign created issue or assign to another person.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Qais Alkhatib , you can use a variable that will only be valid for the context if the rule. Please see this documentation- jira-automation-actions . Reference the Create variable, excerpt below.
Use smart values here: Yes
Define your own smart value, which can be used in other actions and conditions in the same rule. The smart value you define can consist of other smart values, as well as math functions.
Note that this will always return a string. For example, if you created variable called Stakeholders with the smart value {{issue.watchers.distinct}}, your variable would return the list of watchers but the list would be rendered as a string.
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.