Hi everyone,
I'm using "new" Forms on jira service tickets for conditionnal and dynamic fields.
After form submission, I would like to make an automation making a synthsesis of all answers, in a paragraphe field. but I'm unable to achive it by myself wiht smart values.
I can effectively retreive and use smart value {{forms.last}} and {{forms.last.___anyformfield.label or key}} by example. I am also able to use API :
https://api.atlassian.com/jira/forms/cloud/<mycloudid>/issue/<issue.key>/form/<form.id>/format/answersAnd the output is perfect :
{
"label": "Title of the field ",
"fieldKey": "customvalue_selected_on_form",
"answer": "Title of Answer",
"choice": "id_of_answer"
},
{
"label": "...",
"fieldKey": "...",
"answer": "...",
"choice": "..."
},...
My question therefore :
Thanks a lof
Nicoéas
Hi Nicolas - Welcome to the Atlassian Community!
The type of field will determine what the syntax of the smart value looks like. For instance a dropdown is different text which is different from dates.
What type of field are you working with? And I assume you have placed a value in the Field key for the field. What is that value?
With {{forms.last.xxx}} you will capture the data while submitting the form.
After submitting and with the form already in a work item, you need to use this to get the form values:
{{issue.forms.<UUID>}}
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Aaron Pavez _ServiceRocket_ !
But how to retrieve all answers in a simple way when the form is submitted ?
I can "loop" into : {{forms.last}} or {{issue.forms.<UUID>}} .. it seems it's not a Json or a list....
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's use while submitting the form you capture the values with this smart value:
Each form has a field key. Use that to get each value
Name(field in the form) = FName (field key)
Last Name = FLastName
When submitting the form, you capture each value in the automation with
{{forms.last.FName}} and {{forms.last.FLastName}}
Then, you edit the field and add the smart value to the field.
Now, after submitting, you need an automation to run after moving to a status or editing a field or any other action.
Then you capture each value {{forms.last.UUIDoffieldhere}} in the automation and edit the field as the last action and paste the smart value in the edit field.
AFAIK, you don't need a loop to get the data; the data is retrieved from each field using the forms.UUID once it's on the work item.
Before that, forms.last.xxx.
Regards
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.