Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to use a smart value on the "Project" field of the "Create issue" action?

CSPTech September 20, 2022

One of my instances has a project for creating projects. That is, once an issue gets to a certain status in the project, an automation is triggered that creates a project via JSON, with the name and key of the project defined as fields on the trigger issue (Project Name, and Project Key, respectively)

 

This part works fine. However I also need for the nexly created project to have an epic in it upon creation. So, on the same automation , I use the create issue action, and for the project field I thought it would work to put a smart value {{issue.fields.Project Key}} or {{issue.fields.Project Name}}. However neither works

 

Is there a way in which I can use a smart value to determine which project shall be used?

2 answers

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2022

Hi @CSPTech and welcome to the community,

You can use the smart values that @Joseph Chung Yin proposed, but my guess would be that:

  • Either you have to add a re-fetch date component on your rule OR
  • Create a separate rule to create the epic

There is a high probability, that when the rule runs, it will not know the existence of that new project you have just created. Give it a try and let me know.

CSPTech September 21, 2022

What you said is possible as well, however, I tried using this automation with existing projects and it still hasn't worked. I don't think Joseph's suggestion works either because {{project.key}} would get the key to the project that triggered the rule, not the key to the project that was created

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2022

@CSPTech you created the project, but you didn't grant membership, correct? What is the response you are getting from the request?

CSPTech September 21, 2022

Error when creating issue. Specify a valid project ID or key (project)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2022

And if you send a different request AFTER the creation of the project, I will presume that you will not have any problem, correct? 

CSPTech September 21, 2022

No. If I run the same automation with an already-created project, I get the same error

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2022

I mean if you send a request for creating an Epic inside the new project you created with your previous request, do you get the same error that the project ID is invalid?

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2022

@CSPTech 

Welcome to the community.  When you use smart value against the project level content, you will need to follow the syntax described in the following link - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-projects/

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

CSPTech September 21, 2022

I'm not sure this works, because the project where the issue must be created is not the same project where the automation is ran.

 

In the project where the automation is ran, the trigger issue has a field that contains the exact key where the issue must be created. However, using that value does not seem to work.

Suggest an answer

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

Atlassian Community Events