Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: Create linked issue, if its not already done

Sautter, Tim August 15, 2023

Hey,

I have the following idea but can't get it to work:

  • When a "Story"s status is changed to "Refinement", I want to create 2 linked issues in another project, starting with "Refinement: " and "Planning: ". <-- This works so far.
  • Now I wanted to change the automation so, that these linked issues are only created if they do not already exist.
    --> I tried doing this like you can see in the screenshot: Check, if there is any linked issue starting with "Planning:"

The last point doesn't work. The automation always creates a linked issue regardless of whether one already exists.

 

Have I done anything wrong or is it simple not possible to do a check like this?

 

Thanks in advance!

2023-08-15 13_44_18-Automation - Jira – Mozilla Firefox.png

4 answers

3 votes
Els Bassant
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.
August 15, 2023

Hi @Sautter, Tim ,

I see two possible issues:

  1. I'm fairly certain that the related issues condition does not work with smart values. See here for details. But the second one is more important ->
  2. Make sure that your rules applies to all projects involved in this automation. By default rules only apply to their current project. This means that the rule would never find linked issues in another project.

I got this automation to work using the following Branch rule (obviously you can fine tune the conditions according to your own needs):

Screenshot 2023-08-15 at 16.10.05.png

 

Again, make sure that your rule applies to both projects (see "Scope" in the image above). Otherwise the rule only checks for linked issues inside the current project. 

Hope this helps!

Sautter, Tim August 16, 2023

What I don't understand is: why does this work then? I mean, the new task is also in another project, not covered by the Scope, but I can change fields there?

 

Ah, and I cant change the Scope :-/

2023-08-16 10_57_43-Automation - Jira – Mozilla Firefox.png

Els Bassant
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 10, 2024

Apologies, I missed your answer. It is probably way too late, but I'll answer anyway for anyone who finds this thread later:

 

  1. Creating an issue in another project works because the scope of the automation applies to the trigger and conditions. The actions are separate from this.
  2. The scope of an automation can be adjusted on the details page. So you initially create your automation like normal, then go back to the details page to adjust it. You may need Jira Administrator permissions to be able to adjust the scope to multi project or global.
1 vote
Tomáš Vlach
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.
August 15, 2023

Hello @Sautter, Tim

 

I would say its because its restricted to the SWAN project only the linked issues are from different project, they wont pop up in the JQL Search. You need it to set the rule for both projects in my opinion.

Sautter, Tim August 16, 2023

see above :D

0 votes
David Blank
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.
August 15, 2023

HI @Sautter, Tim Welcome to the Atlassian Community!

 

Have you considered using "Contains" instead of starts with? I have used a similar query before and accomplished the same using "~".

 

Here is an example of how I have implemented it:

Screenshot 2023-08-15 at 8.10.43 AM.png

Sautter, Tim August 15, 2023

Yes, I've tried that, too. I'm afraid it didn't work.

Like David Blank likes this
David Blank
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.
August 15, 2023

@Sautter, Tim can we see a screenshot of where you are setting your link type in the create issue action? Could it be that you are reversing the link description? Adds vs. Added by? (not sure if added by is the reverse of adds, just guessing).

I am wondering specifically if you could be referencing the wrong link description (outward vs. inward)

Jira issue link types have the following properties:

  • Name: The title for the link type

  • Outward description: The description of how an issue affects other issues

  • Inward description: The description of how an issue is affected by other issues

Sautter, Tim August 15, 2023

The problem doesn't lay there. Here are 2 screenshots: before and after the status of the main issue changed:

[redacted]

--> There are now 2nd Planning task.

What I want to achieve is, that there are no duplicate tasks. Therefore I tried it by using an if condition checking for the newly created tasks name.

0 votes
Florian Bonniec
Community Champion
August 15, 2023

Hi @Sautter, Tim 

 

Not sure to understand, if you create a link that already exist (Link between A and B of type blabla), it will not duplicate the link.

 

Regards

Sautter, Tim August 15, 2023

I don't want to create a link. I am creating a new issue in another project, when the current issues status is changed.

What I want to change is, that this new issue is only created, if there is not already one with the same name (startsWith).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events