Forums

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

Automation: Problem on issue type creating a linked issue in another project

Morara March 19, 2025

Hi,

I have a project that I use to sort and triage some issues.
This project is used to report the people that create the requests (issues are started on other platform and inputed on Jira through API). An automation alert (email) is run to inform the requestor when the issue transition. 

After the sorting and triage I'd like to create a linked issue to another project. I've already created an automation that creates and links the issues to a specific project and it works perfectly.

This solution was approved and now this same origin platform is creating issues that I must assign to many projects (one at a time). So, I created a custom field that selects the project where the linked issue must be created (all projects on my organization are shown). When I transition some issue to an specific status I want to create that linked issue on the project selected by this field. I created a transition rule that assures this project field can't be empty.

My problem is that in the create step on the automation is returning an error when I select the type of the linked issue being created (I tried all available on the dropdown):

issue type error.png

I also tried to set the issue type as "Same issue type" and "Same issue type as trigger". The valid type error does not happen, but the automation runs with the following error:

automation run error.png

I'm totally in the dark. Can anyone help me create a linked issue on another project based on a custom field?

4 answers

Suggest an answer

Log in or Sign up to answer
1 vote
Bill Sheboy
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.
March 20, 2025

Hi @Morara -- Welcome to the Atlassian Community!

Based on what you describe, if you are using only company-managed projects, selecting the project ID from a field will work with a single issue type such as Task.

The problem is the Create Issue action cannot validate the issue type if company-managed or team-managed projects are used...because with team-managed each project has its own type configurations.

One possible solution is using the REST API with the Send Web Request action:

  • for the selected project ID, call the REST API to get the issue types for the project
  • select the type you need, probably based upon the issue type name
  • call a different REST API endpoint to create the issue in that specific project with that specific issue type ID

There are still challenges with this approach, as a project could be added for which the rule actor does not have permissions.  And so care must be take when creating the API token used in the calls.  Similarly, for projects like JSM and JPD, other permissions may be required.

Kind regards,
Bill

 

PS: would one of the community managers please move this thread from the App Central questions to the Atlassian Automation product questions area?  Thanks!

1 vote
Pasam Venkateshwarrao
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.
March 19, 2025

Hi @Morara 

Welcome to the community, create a Automation rule in source project 

Screenshot 2025-03-20 at 12.25.41 AM.png

 

Hope this helps

0 votes
Matthias Sohn March 20, 2025

hej Morara ,


within Automation for jira u can access the smart values

{{issue.project}} - the project this issue is a part of.

so you have the projectKey of the issue

no need for an infinite loop of if/else

/Mat

0 votes
John Funk
Community Champion
March 19, 2025

Hi Morara - Welcome to the Atlassian Community!

How many different projects are there to choose from? 

Matthias Sohn March 20, 2025

think, depends on permissions of actor

Morara March 20, 2025

Currently there are 18.

We are reorganizing them and I expected that soon they may be around 10.

Like John Funk likes this
John Funk
Community Champion
March 20, 2025

Then the 10 would not be unreasonable to add IF/ELSE logic to the rule for 

IF custom field = ABC then Create issue in Project ABC

Else custom field= DEF then Create issue in Project DEF

and so on through the 10. 

Once you do the first one, you can copy the action and simply change out the project as the location for the issue to be created - it's a fast process. 

Like Morara likes this
Morara March 20, 2025

Thank you for your sugestion.
I´ve already thought about that. My only concern is human error when a new project is created a new branch on the IF/ELSE logic must be created.

Like John Funk likes this
TAGS
AUG Leaders

Atlassian Community Events