Automation: Create new issue with project given as user input

Thorsten Kamann
Contributor
July 25, 2024

Hello,

I am trying to build an action to create an issue in another project. The challenge is here that the user can choose in which project the issue should create.

For this, I created an action with a manual trigger. There is a prompt with a drop-down with the name of enabled projects.

My rule looks like:

Capture-2024-07-25-153830.png

But if I am executing the action, I got this error:

Capture-2024-07-25-154001.png

I tried it with the project key instead of the project name, too, with a similar result.
Has anyone an advice how to achieve this?

Thanks
Thorsten

1 answer

1 accepted

1 vote
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2024

Hey @Thorsten Kamann , 

You need the project ID as smart value to create issues.
You could make a lookup table to match the user readable name to the correct project ID, and create the issue with that. 

You can find the project ID by going to the setting of the specific project, last part of the URL is the project ID. 

yourBaseURL/secure/project/EditProject!default.jspa?pid=10703

 

Hope this helps!

Thorsten Kamann
Contributor
July 25, 2024

Ok, but I don't get the ID via the URL. In my instance, the URL only contains the project key but not a numeric ID:

https://nnn.atlassian.net/jira/servicedesk/projects/ITH/settings/details

 

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2024

Hi @Thorsten Kamann , 

in that case, you can use the API. 

It is described here. The 3rd value should be the ID  

Let me know if that works for you! 

Thorsten Kamann
Contributor
July 30, 2024

Yes, this works fine. Thanks for the hint.

Suggest an answer

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

Atlassian Community Events