Linking an issue by adding a URL to a form

Ana Santos December 23, 2024

Hello! 

I have looked up several places but I cannot find anything related to this. 

I have created a form for certain request type on JSM. 

My goal is to have a field that is filled in with all the ticket numbers related to my form. Upon form submission, those tickets would become linked to the JSM issue, without having to manually link the issues after submitting the form: 

image.png

Is there anyway to do this, either by automation or using the form configurations themselves? 

 

Thank you in advance!

Ana

1 answer

1 vote
Trudy Claspill
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 23, 2024

Hello @Ana Santos 

Referring to this article:

Forms Automation: Access form fields with smart values (smartvalues) 

...it appears that you can access Form fields in Jira Automation. The article refers to this documentation:

https://support.atlassian.com/jira-service-management-cloud/docs/access-smart-values-for-forms-and-form-fields/

You could create an Automation Rule to extract and parse the data entered into the form field, and then use that data to execute Link Issue actions to like the specified issues to the new JSM issue created.

Are you familiar with creating Automation Rules?

Jira Administrators can create rules, and they may allocate that functionality to others through User Groups.

Ana Santos December 24, 2024

Hello, Trudy! 

I am familiar with creating Automations, but I am not entirely sure how to make this one work. 

Ideally, the full rule would: 

1. Check if the field is not empty

2. Check if the field has multiple JIRA urls/keys

3. Run and link all distinct issues listed on that field. 

 

I started small with testing linking just one issue. I tried the following: 

image (1).png

{{issue.forms.4cadedaa-13d7-44d0-970b-e2f0208d928c.Testlabel}}

 

4cadedaa-13d7-44d0-970b-e2f0208d928c is the UUID for the Meeting Notes form (just  a test form I created). I retrieved as per the instructions here

Testlabel is the name of the label in my form: 

image (2).png

However, the rule failed, whether I added the issue key or the full link when submitting. 

I also tried {{issue.forms.4cadedaa-13d7-44d0-970b-e2f0208d928c.Testlabel.distinct}} and {{issue.forms.4cadedaa-13d7-44d0-970b-e2f0208d928c.Testlabel.key}} but that did not work either.

Any idea of how I am doing this wrong?

 

Thank you in advance!

Trudy Claspill
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 24, 2024

Hello @Ana Santos 

Thank you for that additional information.

From the documentation

https://support.atlassian.com/jira-service-management-cloud/docs/access-smart-values-for-forms-and-form-fields/

Fields in forms need to be referenced by their Field Key. You need to set the Field Key for each field that you add.

Screenshot 2024-12-24 at 2.15.13 PM.png

What is the Field Key for your field? The screen image you shared doesn't include the red-boxed portion that would show the field key.

Screenshot 2024-12-24 at 2.12.49 PM.png

 

As a debugging step, in your Automation Rule I recommend that before you try to use the smart value in an action or condition, you first use a Log action to print out to the rule execution Audit Log the actual value for the form field you are trying to access.  That way you can review the rule execution Audit Log and confirm that you are getting back the value you expect. If you are not, then you might not be referencing the form field correctly.

After making that change try to run the rule again.

Also, share with us the output from the rule execution Audit Log.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events