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

Let's automate project creation using Jira Automation!

41 comments

Kristóf Lauber September 25, 2023

Thats clear, but what am I doing wrong, the URL seems ok to me, and everything else as well, I'm attaching the POST callpost.png

Gerben Heinen
Contributor
September 25, 2023

There is not enough info here to answer your question, do you have screenshots that show more, e.g. the url and where your smart value is used in the url?

Kristóf Lauber September 25, 2023

I attached the GET req below, the full url is: 

https://XXXXXXX.atlassian.net/rest/api/3/projectvalidate/validProjectKey?key={{issue.summary.split(" ").left(1).toUpperCase().replaceAll("[^a-zA-Z0-9]","").join("").left(10)}}

 

get.png

Gerben Heinen
Contributor
September 25, 2023

Use a smart value calculate as a separate action and put the outcome in the url, the smart value in the url is not processed at all.

Kristóf Lauber September 25, 2023

How would you go by doing it? If you could give me an example that would be great.

Alex Ziegltrum
Contributor
September 25, 2023

@Kristóf Lauber at one point I had similar issues, as far as I recall. Maybe my approach could be an alterniative for you. I solved this problem using Jira Forms and configured the field for the project key as this:

2023-09-25 11_12_29-Pascal Temel _ Microsoft Teams Classic.png

This is a much more convenient solution, at least for our use case.

Hope it helps.

Kristóf Lauber September 25, 2023

Thank you @Alex Ziegltrum for the recommendation, it sounds good, could you please share more info/screenshots about it? whats the purpose of the linkedfield?

Alex Ziegltrum
Contributor
September 25, 2023

@Kristóf Lauber First, you would need to design the request for "project creation automation" in Forms.

Second you add any field you need for your automation. The mentionened form field stores the wanted project key from the user and forwards it to the customfield "JiraProjectKey" that needs to be created beforehand.

In the automation you can work with the content of this field in the smartvalue, when you do the web request for validating the key with smartvalue:

2023-09-25 11_43_16-Jira Configuration - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

And for creating the project:

2023-09-25 11_44_07-Jira Configuration - Jira und 4 weitere Seiten - Geschäftlich – Microsoft​ Edge.png

Like Kristóf Lauber likes this
Gerben Heinen
Contributor
September 25, 2023

You can use the create variable field to construct your key and use that in the API, see screenshot below.

I might not work with what you're doing, because you paste the entire smartvalue operation in the URL. 

create_variable.pngvalidprojectkey.pngcreateproject.png

Kristóf Lauber September 25, 2023

Thank you both for the help, I was able to do it!

Aron Kuch
Contributor
October 25, 2023

Absolutely brilliant! Exactly what I needed. Thank you!

Diogo Teles
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.
February 3, 2024

@Piotr Zadrożny _Eyzee_  What a brilliant article. Thank you so much! The use case alone is great, but the clear way you explain the power of automation+Reat API just takes it to a whole new level. Great work!

Matvei Makeev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 26, 2024

@Piotr Zadrożny _Eyzee_ , thank you so much for such a beautiful solution! You mentioned automatic creation of boards at the end of the article. How would you do that? I haven't found that functionality in API. 

Piotr Zadrożny _Eyzee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2024

@Matvei Makeev You can create filter using this endpoint:

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-filters/#api-rest-api-2-filter-post

and than create board using this filter using endpoint:

https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-post

You can also create a new project with an already associated board by providing:

  • projectTypeKey: software,
  • projectTemplateKey either com.pyxis.greenhopper.jira:gh-kanban-template or com.pyxis.greenhopper.jira:gh-scrum-template
Like # people like this
Aron Kuch
Contributor
May 6, 2024

The final piece!
Thank you @Piotr Zadrożny _Eyzee_! I got it working and this will make it so much more adopted by the end-users since the project is complete.
I'm curious that you used API 2 for creating the filter; why not API 3? (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/#api-rest-api-3-filter-post)

Thays Carvalho August 9, 2024

Thanks for the post.

Here for me the creation of the software project worked, but it didn't create the board.
Automation doesn't create the board, I know there must be some extra steps to do but I can't find help.
Has anyone ever had this "problem"?

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events