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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, you can set the Project using a smart value.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Trudy! I did not know that one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.