Missed Team ’24? Catch up on announcements here.

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

Automate status updates from multiple projects

Oto Tabares November 12, 2021

Hi,

I have a JSM project, let's call it parent, from which we clone issues into two different projects, design and production. Not all issues get cloned into both projects. In other words, some issues from parent may only have an issue cloned to design or production.

We are trying to create automation rules that auto-update the status of parent issues (tickets) for clients based on the statuses of the cloned issues in design and/or production.

What I'm trying to figure out is how to use JQL to set up a structure like this in my automation rule:

  • If parent has cloned issues that exist in both the design and production projects, then run some rules.
  • Else, if parent only has cloned issues in either design or production but not both, then run these other rules.

Any help would be tremendously appreciated!

2 answers

2 votes
Armand Luziau_Elements_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 15, 2021

Hey @Oto Tabares


What you are asking is possible in Jira on-prem but it is not possible in Jira Cloud. This is due to the restriction on JQL functions imposed by Atlassian on how these functions can interact with their infrastructure.


Regardless, you can still create your automation rule using JQL to compare your cloned issue within your different projects but only if you use Scriptrunner for Jira. The JQL condition you need to use is "issueFunction" and there is documentation about it. 


Let me know if this information helps you with your use case.


Cheers,
Armand.

1 vote
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2021

Hi there @Oto Tabares,

Developer from Automation here.

Depending on your exact setup it might be possible to get the following rule setup to work. I've made a few assumptions with the below examples but it might be able to solve your use-case using a combination of linked issue branches and JQL.

We will need something to link the primary issue in parent with the other issues in design and production, so in my case I assume that design and production tasks have an issue link of "clones" to the parent task. Provided your cloned issue have use some type of issue links then you should be able to achieve the below examples.

To do this I would create 2 rules, one which handles the case of a design issue syncing changes to parent and the second having production make changes back to parent as well. Statuses are linked to issue transitions so you'll need to set that as the triggering event, then attempt to edit/transition the parent issue depending on what you want to happen. You might be able to get it all working in one rule but I think two helps simplify this.

Screen Shot 2021-11-18 at 9.53.46 pm.pngScreen Shot 2021-11-18 at 10.00.23 pm.png

For the second rule you'll need to duplicate this one but change the design project in the conditions to be production. I've added a log action in the example but once you've got it working you can change that to something like edit issue, or transition issue copying from the linked issue if you would like to sync statuses. The related issue conditions with one using some and the other using none will help match the cases that the item is created in one of the sub projects but not in the other.

Since it uses checks in multiple projects the rule will either have to be set as global, or the project scope including the projects used projects.

It's a bit of a complex use-case for Automation so it might not suit your exact requirements, but you can also reach out to support here: https://support.atlassian.com/contact/

Cheers.

Oto Tabares January 12, 2022

Thanks, Yvan. I appreciate you taking a stab at this. Our needs are a bit more complex because we need to update the status of issues in the service project using statuses from cloned issues in two JWM projects. I'm working with a support engineer from the Atlassian team to help with our exact requirements. Thanks again!

yerriswamy s
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!
March 1, 2023

Hi @Yvan Martin 

 

I tried the same way as like below to change the status of linked issue. is cloned by or clones link types are now working.

image.png

 

 

But I get below error saying "No related issues could be found".

image.png

 

 

I have created a issue in JSM and the same cloned into JIRA software project, now I want to change the status of Issue in JSM as same as Cloned issue.

 

Please help me out on this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events