Hello, community.
Is there a way to create a new issue (or clone) without providing a specific project name?
In other words, i need a rule that can create an issue, while target project is based on a trigger' field value (assume that there is a field with the project key or name (tried both) provided by a user and can vary.
tried using smart values for both project and issue type and it fails on 'project name is required'.
i have a workaround in mind but i don't like very much.. (it requires a rule for each possible project, bunch of flags and complex maintenance )
thank you in advance!
I think people are not seeing that this question has been answered, so I am re-posting @Italo _Modus Create_ 's answer as an answer outside of the the other answers thread, because I found that this answer does in fact work!
@Italo _Modus Create_ said:
I was able to achieve this by using the additional fields to overwrite the Project that I need to create the issue.
In my case I have a custom field named "Activity" and the options are
- Task A - ASP
- Task B - DSP
- ...
The bold section is the project that the task should be created into, so I was able to do extract the project key using substringAfter and then use to as the project key.
{
"fields": {
"project":{
"key": "{{issue.Activity.value.substringAfter("-").trim()}}"
},
"Parent link": "{{triggerissue.key}}"
}
}
Hope this helps people find the answer! This was a big unlock for me!
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alex Rouk ,
Not sure which Automation you're referring to. But if you're referring to Jira Automation (formally Automation for Jira) then there is an option in the UI that will do what you want to acheive:
Cheers,
Simeon
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.
Hi @Alex Rouk ,
Does the "same project" option not work for you? It will try to determine it based on the trigger context. So you shouldn't have to specify a project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you again, @Simmo .
it is not that simple..
Imagine i have a rule triggered from project A. The rule is supposed to create a new issue in another project (B, C, D..), based on a value of projectA_field. The value of projectA_field is entered by user.
For example, if projectA_field = "B", the issue will be created in B, if projectA_field="C", then in project C.
Project A is kind of a hub, creating tickets dynamically in other projects
Hope this clarifies.
thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alex Rouk , yeah I'm starting to get the picture now. Is it possible for you to share a few screenshots of how you have configured your rule so we can figure this out?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been working on a similar feature. I have a select field to select the project (eg customField_1). I matched the project name with the selections in that field. In Create issue action I put in {{customField_1}}. I get an error that meta data could not be created for project/issuetype. I've tried similar with Issue Type using a field {{customField_2}} with the value of "Story" and got the same error. It is as though these fields support smart value entries, but it doesn't seem to accept the values unless I'm doing something wrong. I've also tried values for key and the format ProjectName (key) that the selections show.
The workaround I am thinking of testing is using the send web request action to create issues based on smart values. Setting the payload would be the only hard part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Rouk @Matthew Patton @Simmo Did anyone ever figure this out? I am trying to accomplish something similar. The audit log shows the smart value I have in the Project field of the Create Issue action does match an existing project key, but the automation fails saying no key was provided.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to get my use case to work by using the PID instead of the key or name. I found the PID by navigating to the project's edit page, and it was in the URL. Somewhat cumbersome, but it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting, so you used the ID for both the Project and IssueKey Type(i assume no id here would go to the default issue type)? I haven't tried it. I ended up not having to pursue this further due to some changes in plan.
I have written scripts to create tickets, and seeing that the payload uses IDs, it makes sense for what Blake mentioned. Here is an example for POST.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that would make sense to add flexibility, but in this case, it's a hard configuration for me depending on an Insight object selected in a different field, so that object just has the project's PID as an attribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This is exactly what i need to implement. If someone can show a step by step process, it will be very awesome.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to achieve this by using the additional fields to overwrite the Project that I need to create the issue.
In my case I have a custom field named "Activity" and the options are
The bold section is the project that the task should be created into, so I was able to do extract the project key using substringAfter and then use to as the project key.
{
"fields": {
"project":{
"key": "{{issue.Activity.value.substringAfter("-").trim()}}"
},
"Parent link": "{{triggerissue.key}}"
}
}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.