Forums

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

How to return Status and Summary for multiple Jira issues in Confiforms?

Aster May 29, 2023

We have a Confiforms "Smart Multi-select" field for users to select Jira issues, and we would like to show the selected issues' Status and Summary when users fill out the form.

We are using "Lookup and set JIRA issue data" now, but can only get the status and summary for the first selected Jira issue. Wondering if there is any other way to show all of the selected issues' status and summary? Thanks!image.pngimage.png

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
May 30, 2023

Hi

This action rule is about looking up the data from Jira for ONE issue, not multiple

I suggest to do this a bit differently, using the hidden Jira multi-select field

See this demo: 

http://recordit.co/gb0XTrqbqY

And the configuration video:

http://recordit.co/pZCcDgbfei

 

Complete configuration:

<ac:structured-macro ac:macro-id="ff48c8c5-d6ce-456a-9de2-fb3e5c1fa0ea" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="25fab24e-12a6-4c88-beb9-9141c8315a2f" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="type">Embedded</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="bafffcfc-cce3-4902-8aa1-d47c09502b2c" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">Number</ac:parameter>
<ac:parameter ac:name="fieldLabel">Number</ac:parameter>
<ac:parameter ac:name="values">false[JTEST-100=JTEST-100|JTEST-101=JTEST-101|]</ac:parameter>
<ac:parameter ac:name="type">multi</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="7504e1ab-57c6-4868-b78c-edb40119da28" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">jiraKeys</ac:parameter>
<ac:parameter ac:name="fieldLabel">Jira keys</ac:parameter>
<ac:parameter ac:name="extras">vertuna-test</ac:parameter>
<ac:parameter ac:name="type">multijira</ac:parameter>
</ac:structured-macro> </p>
<p>
<ac:structured-macro ac:macro-id="b143b826-d611-47e5-b0ae-9fd5f81035c7" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">summary</ac:parameter>
<ac:parameter ac:name="fieldLabel">Summary</ac:parameter>
<ac:parameter ac:name="type">textarea</ac:parameter>
</ac:structured-macro>
</p>
<p>-- hide JiraKeys field</p>
<p>
<ac:structured-macro ac:macro-id="353d3608-7967-4206-8672-c134332b9206" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="fieldName">jiraKeys</ac:parameter>
<ac:parameter ac:name="action">Hide field</ac:parameter>
</ac:structured-macro>
</p>
<p>-- set JIraKeys field's value</p>
<p>
<ac:structured-macro ac:macro-id="6513b4f8-551d-437d-897f-29cb4b90597d" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">!Number:[empty]</ac:parameter>
<ac:parameter ac:name="values">jiraKeys=[entry.Number.asList]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
<ac:parameter ac:name="actionFieldName">Number</ac:parameter>
</ac:structured-macro>
</p>
<p>-- set summary</p>
<p>
<ac:structured-macro ac:macro-id="579a953b-7589-4e04-9ee4-ae8f3a65e578" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">!jiraKeys:[empty]</ac:parameter>
<ac:parameter ac:name="values">summary=[entry.jiraKeys.transform(fields.status.name.append(\n)).split(,).asList]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">jiraKeys</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Hope it helps

Alex

Aster June 6, 2023

Thanks @Alex Medved _ConfiForms_!

This works when using Multi-Select in the user input field. However, we are trying to generate the list from our form records by using Smart Multi-Select, but then the summary field returns multiple rows of blank. Did I missed anything?

image.pngimage.png

Alex Medved _ConfiForms_
Community Champion
June 6, 2023

Hi

Then the rule that sets the fields from the multi-select field needs to be adjusted to extract the keys from a form that is linked throiugh the smart multi-select field

<ac:structured-macro ac:macro-id="6513b4f8-551d-437d-897f-29cb4b90597d" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">!Number:[empty]</ac:parameter>
<ac:parameter ac:name="values">jiraKeys=[entry.Number.asList]</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
<ac:parameter ac:name="actionFieldName">Number</ac:parameter>
</ac:structured-macro>

I dont know what is your "CTCR Tag Test" field name, but assuming it is called a Tag

Then the set  value expression would be something like

jiraKeys=[entry.Tag.transform(CTCRNumber).asList]

Alex 

Aster June 6, 2023

It works!! You rock, @Alex Medved _ConfiForms_ Thanks so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events