Can I edit an issue in another project when a custom field changes with Automation for JIRA?

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2017

Is it also possible to update existing issue in other project with Automation for JIRA?

The whole rule would be if a multi-select custom field gets updated in issue in project X, then this rule would trigger and find the existing issue(s) which has the same value in field Summary in project Z and transition this project Z issue to a different status.

2 answers

1 accepted

3 votes
Answer accepted
andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2017

Yes you can do this with Automation for JIRA.  Just make sure that you create this rule as a 'global' rule since project rules can only edit issues in their project.  To do so go to 'JIRA Administration' -> System -> Automation rules (or simply hit the '.' shortcut and type 'Automation').

Make sure the Project(s) scope is set to global.

Then you'd create a rule like this:

Automation rules - Code Barrel JIRA 2017-01-27 10-21-32.png

Here's how this works:

  • We use the 'Field value changed' trigger to monitor our 'Sample select' custom field
  • Next we have a JQL condition to ensure that we only run the rule if the field is updated in the DEMO project (my project X)
  • Then we use a 'related' issues action to find all issues in project TIB (my project Z) where the summary is the same as that select field's value 
    • For those issues we transition them to 'DONE'.

 

Cody Riddell September 26, 2017

This is sooo close from fixing my issue. Can you look at my relatively similar situation.

I have a custom field 'Companies' that is brought in by a 3rd party plugin. I want to be able to update the company field when for all linked issues to the original issue created. 

In a scenario base, 
A JIRA Help Desk issue is created. 
A link is created and the attachments, description, summary and reporter are copied to a new JIRA Software Issue (separate project).
I want to be able to also copy or update or sync the original Company from the original Help Desk Issue. 

Is this possible? 

Thank you!

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2017

Hi Cody,

Is Company a single select field?  If so, then when you create the new issue in the software project, then you should be able to set the 'Company' field there to this smart-value (https://codebarrel.atlassian.net/wiki/spaces/AUTO4J/pages/27656216/Smart+Fields):

{{triggerIssue.Company.value}}

If this doesn't work, feel free to post your current rule configuration (screenshot) to https://codebarrel.io/support and we can take a closer look at your exact rule config.

Cheers,

  Andreas

Cody Riddell September 27, 2017

Thank you Andreas, I'll go ahead and submit this to codebarrel support. 

0 votes
Alex January 3, 2018

Hi @andreas, thanks for this amazing solution! 

I have one more question - is it possible to affect only issues linked to the trigger issue? And can the link type/s affected be specified?

 

Thanks!

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2018

Hi @Alex,

Yeah so with the related issues condition, you can also specified "linked issues" as one of the options.

Or you can use JQL and use something like use the linkedIssues() function part of JQL (see https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-functions-reference-764478342.html#Advancedsearching-functionsreference-linkedIssueslinkedIssues() )

For example: 

issue in linkedIssues({{triggerIssue.key}},"is duplicated by")

 

Hope that helps!

Cheers,
 Andreas

jun lee January 16, 2022

Hi,

 

I am setting up an automation rule. 

: create an issue B from issue A by project A automation rule --> success

: edit an issue A of project A  by project B automation rule --> fail

 

global rule.jpg

Cheers,

JUN.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events