Forums

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

Global Automation cant create task

Samuel Imrich March 7, 2025

I am having troubles (and tried 1000 ways how to fix) running automation (global) that is triggered upon Project creation. Trigger works perfectly, but i can not create a single issue/task. Everything is blank, out of the box, no custom fields, values etc but i am still getting this error

 

Error retrieving the issue type fields for project/typeId -
10101/10010
I tried different issue types (they are properly mapped in project), custom fields, ALL fields possible, no difference, every time this error. Cloning the issue works, but not creating from scratch. Also tried making actor as myself (admin) rather than jira automation.
I want to have an automation that will be triggered when a new project with specific name is created, creating a list of tasks for that project automatically.

3 answers

1 accepted

2 votes
Answer accepted
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 7, 2025

Hi @Samuel Imrich -- Welcome to the Atlassian Community!

The likely cause of that symptom is timing (i.e., a racetrack condition) where the Project Created trigger fires before the project configuration (including the issue types) is fully available...leading to the errors you observe.  

For workarounds, something needs to happen to slow down the rule a bit after the trigger and before the Create Issue actions.  What license level of Jira are you using?

  • If you are on the Premium or Enterprise level, the Delay action could be used to pause the rule for a while until the configuration completes: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Delay
  • If you are on the Free or Standard level, that action is not present.  Instead you could try performing some actions which take time to slow the rule.  This still may not help as the duration needed is unknown, but it is worth a try. 
    • Use Lookup Issues action to load many issues with JQL, ignoring the results.  That would probably add at least 2 seconds of time.
    • Use one (or more) Send Web Request actions to call the REST API, such as for an issue search with JQL.  (Remember to check the box to allow the rule to continue even if the request fails.)
    • etc.

 

Kind regards,
Bill

Samuel Imrich March 7, 2025

Hey Bill, Thanks for your answer!
I tried delaying the execution by adding three dummy web actions just to prove the concept (and wait till response is received). There was more than 30 secs of delay between project creation and Create issue state but it failed as well. Or should it wait longer?Screenshot 2025-03-07 183428.jpg

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 7, 2025

Just to confirm, what type of project is this for: company-managed or team-managed?

If this is for a team-managed project, their issue types are unique for each project.  That is, the internal ID for the issue type is different even when the names are the same. 

The saved ID values in the Create Issue actions will not work as they are unknown when the rule publishes and they cannot be updated dynamically.  (At least that was not possible when I tried this scenario a year ago.)

 

I believe the only workaround is to use the Send Web Request action to call the REST API and...

This approach will likely eliminate the need for other delaying rule actions for the racetrack condition.

Samuel Imrich March 7, 2025

Uff, thats a really complicated workaround for such a simple task, but you are correct. When i tried changing the project type to Company managed, automation ran without any issues, so thanks for that! At least now I know where to look.

I am trying to build the workaround with the API you proposed and keep you posted if that helped, but i am a bit dissapointed that such a trivial thing can not be done with "out of the box" solution.

Samuel Imrich March 10, 2025

@Bill Sheboyjust FYI, i managed to get it working with proposed solution using API, although i must admit that this solution is so overkill for the thing that it really does - just creating a task on newly opened project.

Screenshot 2025-03-10 151930.jpg

and here my second question arises, is there a solution to have a global variable (or property set) in jira automation that is available across all rules? Let say, like a bearer token.

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.
March 10, 2025

There is an open suggestion to add secrets storage to support automation rules: https://jira.atlassian.com/browse/AUTO-1365

Until that is added, I do not believe there is a built-in, secure place for such information when using the Free license level.  Perhaps check the Atlassian Marketplace to learn if one is available with an addon.

0 votes
Jeremiah Rappley
Contributor
March 7, 2025

Hey Samuel, have you looked into using the Incoming webhook trigger for your automation rule? 

I'm happy to guide you through setting this up!

Samuel Imrich March 7, 2025

Thanks Jeremiah, but the trigger itself is not a problem, the problem is simple and basic operation which is "just create a task". I have done complicated things in prod, this is just testing in my dev but cant get a simple task being created for no valid reason.Screenshot 2025-03-07 152804.jpg

0 votes
Vishal Biyani
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 7, 2025

@Samuel Imrich 

Can you share the screen shot of the automation that you have created so far?

Samuel Imrich March 7, 2025

Screenshot 2025-03-07 151835.jpg

Vishal Biyani
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 7, 2025

@Samuel Imrich 

Can you try using same project instead of same project as trigger?

Also, not sure if creating a Epic first makes a difference. 

In my cloud instance the rule is executing file and creating the issues

snip.png

Samuel Imrich March 7, 2025

Did exactly the same thing, error as usual (but the first ID is the one from Epic)Screenshot 2025-03-07 160827.jpg

Screenshot 2025-03-07 160725.jpg

Suggest an answer

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

Atlassian Community Events