🎉 New! Access form and form fields with smart values in Jira Service Management

Hello Atlassian community ðŸ‘‹

We’re excited to announce we’re now supporting smart values for Forms in Jira Service Management. Eliminate manual data entry and leverage dynamic data by accessing smart values on submitted forms on issues. Not only can you now retrieve form data in Jira Service Management, but can also use these values to power automations and fuel reporting. Read more about accessing smart values

 

Here’s how it works

Access smart values using the Forms submitted trigger

You can access submitted forms on issues when using the Forms submitted automation trigger by using {{forms}} to format the value of forms in a list when setting up a rule. To access a specific form from a list, use the automation lists smart values to retrieve the form you’re after. You can also combine, reformat, and manipulate smart values to suit your specific needs.

Example

John wants to create an automation rule that adds a comment with onboarding notes whenever an ‘Employee Onboarding’ form is submitted.

Before he creates this rule, he needs to make sure the ‘Onboarding notes’ field in the ‘Employee Onboarding’ form has a field key. He makes this ‘onboarding-notes’.

 

5a3dcf60-822d-476f-9769-6bf5ab8f724d.png

 

He now navigates to Automation to create this rule and selects the Form submitted as the trigger and ‘Employee Onboarding’ as the form. He then adds the action Comment on issue and enters {{forms.last.onboarding-notes}} as the comment.

 

2d8ddfcf-bb2b-4fee-bf5f-20fdbe68b3e0.png

 

Now whenever an ‘Employee Onboarding’ is submitted, the value from the ‘Notes’ field will be added as a comment on the issue.

 

81ee0573-d53e-4c05-a611-8d50b715158d.png

 

Access smart values without using the Forms submitted trigger

You can also access any forms on an issue by using {{issue.forms.<UUID>}} and referring to automation lists smart values. These will be grouped by their Universally Unique Identifiers (UUIDs) and be returned as a list. The UUID can be retrieved from either the Forms REST APIs 'Get project form index', or by inspecting elements on the Forms landing page and accessing the UUID via the Network tab.

Example

John wants to create an automation rule that adds a comment with an employee’s latest salary to an issue.

Before he creates this rule, he needs to make sure the ‘Salary’ field in the ‘Payroll setup’ form has a field key. He makes this ‘payroll-salary’.

 

d45d2a46-16ef-4364-ab6b-66b5e5300cd9.png

 

He now navigates to Automation to create this rule and selects the Manual trigger from issue as the trigger. He then adds the action Comment on issue and enters {{issue.forms.f7142b07-d3a4-4522-a7e4-8799d526e0a6.last.payroll-salary}} as the comment.

 

b6ab8092-543b-4b10-bc86-b9757d59e6d1.png

 

To get the UUID for ‘Payroll setup’ form, he goes to Forms and inspects elements to find the UUID in the Network tab.

 

71631719-5535-4ccf-b592-e59df4e63b56.png

 

Now whenever multiple ‘Payroll setup’ forms are on an issue, the value from the ‘Salary’ field on the most recent ‘Payroll setup’ form will be added as a comment on the issue.

 

ca4b491f-ef9a-47d0-bdf0-c60b1c4fee44.png

 

Let’s break down the {{issue.forms}} smart value.

a9b1b4aa-846e-45bd-838e-8001ad19e658.png

 

What’s next?

Our team has been hard at work bringing this highly requested feature to Jira Service Management. Based on your feedback, we’ll be taking note of any future updates you’d like to see, so add comments below if you have any questions or feedback for the team.

18 comments

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 13, 2024

This is beautiful! Thank you!

Like • Tomislav Tobijas _Koios_ likes this
Tomislav Tobijas _Koios_
Solutions Partner
Solution Partners provide consulting, sales, and technical services on Atlassian products.
November 13, 2024

Very nice improvement and a great step-by-step article!
Kudos to everyone involved in this release 🎉

Like • # people like this
David Foote
Contributor
November 13, 2024

If you run automation and log the {{issue.forms}} it will also give you the UUID of the form.

Right now it looks like when you access a checkbox field it just gives the id of the selection, not the associated value. Are there any plans for future enhancements to give us back more data?

 

 

Like • Levi Staley likes this
Hanh Pho
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2024

Hi @David Foote, please refer to the Access smart values for forms and form fields page, on accessing the values of the different field types.

For example, a multi-choice field like a checkbox, you can access the id and the label of the last selected choice by:

{{forms.last.choiceField.last.id}}
{{forms.last.choiceField.last.label}}

 

Like • # people like this
Tanya Tranter November 13, 2024

Can I assume none of this wonderful functionality is going to be made available in the DC version? 

David Foote
Contributor
November 13, 2024

Can confirm that using label works! I assumed it would be value, like a lot of fields use.

Any chance we can get the form smart values added to https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/ ?

Thanks @Hanh Pho !

Like • # people like this
Tobias H
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

I've been waiting for this forever, so happy to see it finally going live.

90% of all new custom fields we create are only there to be used in automations with dynamic forms, so this is very welcomed!

Like • # people like this
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2024

@Sam Knight , God bless you guys!!!!

This is awesome!!

Like • Susan Waldrip likes this
Tobias H
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2024

Just a question @Sam Knight, are there any plans on making it easier than finding UUID and inserting into smart values? It's great to see it working right now, but it's a real pain to find and set up. Not to talk about how hard it is to read what is happening in the smart value itself.

Like • # people like this
Dusan Kalanj
Contributor
December 6, 2024

This is great! Do you maybe also support getting a value from a custom radio button? If I use the approach from the example it works super for text fields, but for radio buttons I haven't been able to get it to work by using .value. This is the last thing I need to solve my use case.

Like • Susan Waldrip likes this
Dusan Kalanj
Contributor
December 6, 2024

Never mind, found the solution in the comments, thanks!

Like • Susan Waldrip likes this
Adit Thapa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2024

Hi Sam, none of the field notes that I have set are appearing as smart values when I try to put together an automation using the example you have included. Am I missing something?

Tom Horton
Contributor
December 10, 2024

Is it possible to set the Fixed versions field to a calculation when an issue is Resolved? I manually set the Fixed versions to the current year and work week, in the form of 2024.50. Automating this would be great.

Evert Morren
Contributor
December 12, 2024

Is it possible to use the smart values in reports? 

If yes how can I do that?

Like • Susan Waldrip likes this
Max McFarland
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2024

This is fantastic! Is there any way to count the number of questions on a form and do branching?

Like • Susan Waldrip likes this
Kristján Geir Mathiesen
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, 2024

Sweet! Thank you.

Like • Susan Waldrip likes this
Dimitrios Kouroumichakis December 17, 2024

Hello everyone,

thanks in advance for the function :)

I'm trying to show the corresponding fields in a comment from a form with the checkbox.

I have used the following:

{{issue.forms.UUID.last.Label}} but I only get a number, what exactly am I missing so that the text is displayed when I click on something from the checkbox.

Best regards

Owen Scott
Contributor
December 17, 2024

Question — does the forms submitted trigger happen on issue creation? If I complete a form in the portal, which creates a JSM ticket, it's not triggering the "form submitted" action and my automation isn't firing 🤔

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events