Forums

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

Error setting up Jira automation for task creation upon new project creation

Esteban Pisera May 29, 2024

I set up an automation in Jira so that when a new project is created, a task is also created within it, but I'm getting the error:

Error setting up Jira automation for task creation upon new project creation

 

Captura de Pantalla 2024-05-29 a la(s) 15.10.03.png

1 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.
May 29, 2024

Hi @Esteban Pisera -- Welcome to the Atlassian Community!

In your Create Issue action, I see you selected the option "Same project".  That will try to use an issue from trigger to find the project, but there is no issue to use.

And, I do not believe there is a way to supply the project as a smart value using the Issue Create action.  Update:  Please see Trudy's post below for now to use the project's smart values when creating an issue.

 

Another way is to create the issue in the new project is using the REST API with the Send Web Request action, supplying the project in the request.  Please see this how-to article to learn more about that method: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

 

Kind regards,
Bill

Esteban Pisera May 29, 2024

Thank you for the prompt response.

But the action to create the task is 'use the same project as triggers the action,' so it should know the project where the task is going to be created.

Trudy Claspill
Community Champion
May 29, 2024

Actually, you can set the Project using a smart value.

Screenshot 2024-05-29 at 12.49.09 PM.png

I tested this. It worked.

The trick, however, is getting the right Issue Type in the next field.

If you create a Team Managed project, all the issue types in that new project get unique IDs, so you would not be able to select the correct issue type in this action because they don't yet exist.

This shouls work fine if you are creating Company Managed projects. But not all types of Company Managed projects use the same Issue Type Scheme. So you might select an issue type here that doesn't end up being part of the created project.

Like Bill Sheboy likes this
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.
May 29, 2024

Thanks, Trudy!  I did not know that one.

Like Trudy Claspill likes this
Esteban Pisera May 30, 2024

Thank you for the response. The idea of using a smart value is very good, but as you mentioned, it doesn't work for team managed projects.

Trudy Claspill
Community Champion
May 30, 2024

Are you creating Team Managed projects? 

I don't believe it will be possible to set up a rule such as this specifically for Team Managed projects. To create issues in Team Managed projects through an automation rule you must explicitly select the Project in the Create Issue action so that the correct set of Issue Types can be retrieved. Since the underlying unique IDs for issue types in Team Managed projects are specific to each project, that is the only method for the Automation Rule to be able to select the correct issue type for the project.

Esteban Pisera May 30, 2024

What I am creating is a Kanban using the "software development" project template, managed by the team.

In the company, projects are created with that configuration. What interests me is that in each project created, there is a default task created.

Trudy Claspill
Community Champion
May 30, 2024

As I said, it will not be possible to use an Automation Rule with a Create Issue action to achieve your requirement for newly created Team Managed projects.

You could potentially use an Automation Rule with a Send Web Request action to create the issue via REST API. I have not experimented with that method.

Here is a link to the API reference for creating an issue:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post

Looking at the example they are supplying the unique numeric ID for the issue type to create, so you may need to execute another Send Web Request action first to retrieve the issue types from the newly created project to get the correct ID.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events