Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Question on created multiple stories during a post function with JMWE?

Dale Bosserman
Contributor
December 11, 2017

I'm trying to configure a conditional post function based on 2 custom fields. They are both multi select lists. The first field I'm looking at is "Products Impacted" the second is "Supplier". If "Products Impacted" = A then I want to create a story for each "Supplier" selected with the summary: Supplier <Supplier Name>.

Is there a way to tell the post function to create a multiple stories depending on how many items were selected in the 2nd custom field? 

1 answer

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2017

Hi Dale,

unfortunately, this is not currently supported by JMWE. The only solution is to create one Create Issue post-function instance per possible Supplier, and use Conditional execution to only run that post-function instance if the corresponding Supplier is selected.

David

Dale Bosserman
Contributor
December 11, 2017

Thanks David.

I was afraid that was going to be the answer. Since we have over 100 suppliers and we cannot copy a post function I don't think that would be the best solution. 

Maybe I will just create one story if the supplier is not empty. 

Also, if I wanted to find out the value(s) that was selected in the multi select list to place in another field, what would be the expression I would use? 

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2017

Hi Dale,

actually, there might be a better option. What's the maximum number of suppliers you expect to be selected simultaneously on any given issue?

As to your other question, are you using Jira Server or Jira Cloud?

Dale Bosserman
Contributor
December 12, 2017

Hi Dave, 

20 should be the max. 

Also, we are using Jira Cloud. 

Thanks for your help!

Dale

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 12, 2017

Hi Dale,

20 is probably pushing it, but you could create 20 instances of the Create Issue post-function, with the following configuration:

Summary:

Supplier {{issue.fields['Supplier Name'][<n>].value}}

Conditional execution:

{{ (issue.fields["Products Impacted"] | find({"value":"A"})) and issue.fields['Supplier Name'].length >= <n> }}

where <n> is the position (1 to 20) of the corresponding Create Issue post-function in the list of post-functions, and "A" is the product name.

For more info about accessing fields of an issue, refer to https://innovalog.atlassian.net/wiki/x/bwBzBg

David

Dale Bosserman
Contributor
December 12, 2017

Great. I think that will work. Thanks Dave!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events