Hi,
I would like to create a ticket (parent ticket - PAR-xxx) and automatically create sub task tickets whereby the project key would based on the custom fields with multiple selection (custom field called "project": PJ1, PJ2, PJ3).
Then the sub tasks ticket creation would be PJ1-xxx, PJ2-xxx, PJ3-xxx.
Herewith my scripting, not sure which part was gone wrong.
I gotten the errors message to say: No Project found with the key "PJ1, PJ2, PJ3".
*Note:
I tried the project key in automation rule creation, it worked.
Kindly advise and assist.
Thanks.
The iterator should actually be the value of your multi-select custom field, and the calculated project should be:
{{it.value}}
This way, one subtask will be created per selected value of the"project" custom field.
Thanks David and I'm truly appreciated your replies.
*I'm not really a tech guy but I am learning now.
Mind to ask does that mean the scripting for project and the iterator also put {{it.value}} will do?
Actually I tried multiple ways as per your advise.
1. I remained the scripting for project calculated, the iterator I replace with {{it.value}}, with and without the iterator return JSON check box. - No errors and no sub task being created as well.
2. Replace {{it.value}} in both places (project calculated and iterator) - no errors and no sub task being created as well.
3. Modify the project calculated scripting a little bit and put {{it.value}} in iterator - no errors and no sub task being as created as well.
Mind to share more about your insights.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The iterator script is supposed to return a list of values over which the post function will iterate to create one subtask per value. In your case, since you want to create one subtask per value selected on your checkbox custom field, the iterator should be:
{{issue.fields.customfield_10050 | join("value",",") }}
which will create a list of the text value of each selected option.
Then for the "calculated project" setting, use this:
{{it}}
which will return the current value of the iterator. However, this will only work if the checkbox values are project keys, not project names.
Finally, this post function will only create the subtasks. The main issue must first be created with another Create Issues post function, and both post post functions must be placed in a Sequence of Post Functions post function.
I believe there is such an example in the documentation for the Create Issues post function.
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're welcome.
Can you "accept" the answer so that others can benefit from it?
Thanks
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.