We're setting up an automation which fires when a ticket is transitioned to closed. We then want to transition another ticket to In progress. The problem we're looking into is that there's no way (that we've found) to limit how many tickets you loop over. We're using this to get the issues: https://support.atlassian.com/jira-software-cloud/docs/work-with-related-issues/
- Use "For JQL" to lookup issues (in our case: status = "Pending" AND reporter = {{issue.reporter.accountId}} AND project={{issue.project.key}} order by created)
- We want to transition one of the resulting issues from this to In Progress.
The problem could be solved if one of the following was available:
- Condition/Variable that lets you look at which result number in the for loop you're on (I understand that they run in parallel, but you could still have a variable that tells you the position of the result)
- In the For JQL lookup, add a way to limit the results to a specific number. It limits it to 100, but there's no way to lower that limit.
Hi @jctenney ,
welcome to the Atlassian Community!
I've been thinking about this and to be honest, I don't see any clean way of doing it.
Maybe if you share more information about your use case, we will be able to find any other way how to do it.
We basically only allow a single issue by reporter that can be in In Progress at a time. When one is closed, we need to grab the oldest issue (that is Pending) for the same reporter and move it to In Progress.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you.
The only possible way I can see is to create custom groovy script, but you would need some additional application for it, this situation is too much specific.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah - we're actually on the cloud version, but custom variables don't solve the problem as for loops don't share the updates across them. In other words, if I change the value of a variable in one of the loop actions, the other loops don't see those updates. That's because it's not actually a for loop, but more like a fork of the process. Is there a place I can create a feature request for Jira Automation in the Cloud? I'm not seeing an obvious project for that type of request.
I've already resorted to using Scriptrunner to do what we need. We were so close on Jira Automation though and would have been nicer to have it there than in code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, sorry, I realized it too late that you are on cloud (probably the codebarrel tag confused me).
I think the best place is Jira Cloud (including JIRA Core) + component Automation for Jira.
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.