We're working on creating a JSM automation upon form submittal.
The need is to edit the description field with all the labels and values that the user entered in the last form submitted.
For example, let's say the form asks these questions.
Upon submittal of the form, we want to use automation to edit the Description of the issue as follows:
Note that "Date Needed: was empty, so we don't want to see it in the Description field.
We'd like to accomplish this using smart values but in the most compact fashion. Also, we have multiple forms (associated with multiple request types) so a generic solution would be best.
Any ideas on how we can accomplish this?
This sounds like an interesting challenge, hopefully the below can help.
Setup of the Forms
Automation Rule
{{issue.description}}
* <Field Name>: {{issue.Field Name}}
You'll then repeat part 2 over and over for each field. This is the "cleanest" and "most readable" way to implement this automation rule, although it uses more actions than others.
Quick note on using the IF/ELSE - you do not want to add an "ELSE" clause as it will only look at one of them, instead only use the "IF" for each of the "IF/ELSE" so it goes over all, skipping those that shouldn't be added (e.g. if empty). See screenshot below as an example:
Thanks for the reply, however, we want to iterate over all the existing fields in a "for each" fashion so that we don't have to hardcode field names at all.
We have different forms with many different fields, therefore hard coding is a chore.
Lists looks promising but we can't find a good example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hi @Michael Woffenden did you found a solution?
So far I only end up implementing a static value reading per field within the form, but not a dynamic/iterative one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Woffenden so far there are two options:
- Get form from the API and iterate responses https://community.atlassian.com/t5/Jira-articles/Automatically-update-Form-fields-answers-and-manipulate-more/ba-p/2481946
- Use smart values (not really dynamic, but better than before) https://support.atlassian.com/jira-service-management-cloud/docs/access-smart-values-for-forms-and-form-fields/
Will share an example once I test it
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.