How to comment user and form details in "Form Submitted" triggered automation?

Trenton Letz
Contributor
September 6, 2024

 

Is there a way to access the user and form details when a Jira automation is triggered by a form submission?

I'm working with Jira Service Management (JSM) and I'm using the "Form Submitted" trigger in automation. What I'd like to achieve is to automatically add a comment to the ticket that includes:

  1. Who submitted the form (user details).
  2. Which form was submitted (form name or identifier).

Is there a smart value or method that would allow me to access this information and include it in an automation rule's comment action? If so, what smart values would I use?

Any help would be greatly appreciated! Thank you!

2 answers

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

There is no way of getting the form name via a smart value. If you do not specify the form in the Form submitted trigger the only option would be to use the Forms REST API to get the name. {{initiator}} will get you the user that triggered the automation.

Trenton Letz
Contributor
September 6, 2024

Thanks for the reply, but assuming there are multiple forms on the request how do we know which form was the form that was submitted to cause the triggering of the automation rule?

Would you call the Get form index endpoint sort to find the form that was most recently updated?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

Yes, the Get form index would get you the name of the form. If the issue has multiple forms then you just have to look at the updated property to figure out which form it was that was submitted.

Trenton Letz
Contributor
September 17, 2024

This works; however, you need to be careful when submitting forms concurrently to give the automation some time to pull from the REST API the correct form that's been updated!

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

@Trenton Letz -

I agreed with what @Mikael Sandberg stated.  For the FORM submitter, it should just be the issue reporter.  Where you can just use {{issue.reporter.displayName}} assuming that you use your FORM setup to trigger issue creation.

Best, Joseph Chung Yin

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events