Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get Value form Jira Form

Mergim Rexha February 3, 2022

Hello,

I use the new tool used by Jira (forms). This allows you to quickly and easily create new forms so that they are then displayed in Jira Service Management for the end customer.

Previously, I worked with custom fields, which was more time-consuming.

My problem is the following: With custom fields, I was able to trigger the value being entered and display it in the title of a ticket, for example: {{issue.customfield_10084.value}}

For the forms, I am looking in vain for a field ID.

I read in a forum that this seems to work here (pro forma), but unfortunately the doc is not detailed enough. {{issue.properties. "proforma.forms.i1".state.answers.AAA.text}}

Here I wonder what is meant by "i1" and what is meant by "AAA". Or is this a plugin definition from Proforma and not from Jira Forms itself?

Would be great if someone here can give me information on how to trigger a form field.

4 answers

4 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

Hi @Mergim Rexha , as Forms is newly integrated solution I have not had much time to play/research. With that said I want to say that I seem to recall that Forms integration with automation is limited or absence. I may be wrong here for sure and I plan to find an official response on this. I (or someone) will post back here. I did find this old Thinktilt (developer of Proforma) cloud article that seems to qualify my belief.

https://docs.thinktilt.com/proforma/Jira-Automation-(Cloud).1571291510.html 

Mergim Rexha February 3, 2022

Thank you Jack. 

I also read through the link and from there I also got the definition: {{issue.properties. "proforma.forms.i1".state.answers.AAA.text}}

He is also talking about an issue JSON in the settings, which I don't see or have at all.

Would be basically happy to find a solution here, because otherwise I would have to implement it with custom fields again.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

I heard from colleagues that we should see the automation-forms support coming in the April timeframe. This could change but at least it is apparent it is active and near-term.

Like # people like this
Mergim Rexha February 3, 2022

Thank you for your feedback.
This means that there is no way to get the values by ID using Jira automation right now, correct?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2022

Yes, that would be my take away.

Like Mergim Rexha likes this
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 6, 2022

Hi @Mergim Rexha 

I found this question whilst assist a user on another question; a Community member pointed us to this Proforma help page.

It doesn't seem to work that way in Forms for me though. I'm using Forms after it was integrated by Atlassian, not before as a standalone App - so the option Issue JSON is not available.

But, I found a workaround using Automation...

 


Pre-creation:

  • Create a Form, with the appropriate questions
  • Link it to the relevant Request/Issue Type
  • Turn ON Create new issue and copy the link, to make the Automation rule easy to activate

 


Automation:

Create a temporary rule...

  • Trigger: Issue Created
  • Action: Add Comment to Issue. In the Comment box...
    • Use an appropriate Proforma smart value, for example for a text field, use: {{issue.properties."proforma.forms.i1".state.answers.AAA.text}}
      • AAA is the Question ID, which you want to locate.
    • To check each question, to verify which ID relates to which, create a smart value line for the number of questions you have - so I had 15 on my form, thus had 15 separate smart value lines in the box.
    • Change AAA to be an ID number - so again, for my 15 separate lines, each had a unique number between 1-15.
    • Finally, you need an easy way to locate each line once the smart value becomes an actual value. I used lettering, so added A-O before the smart value.

Save the rule, and activate it.

 


Post-creation:

  • Create an Issue using the copied link to the form
    • Populate each field with a unique text value
  • The correct IDs should populate the text values into the comment added post-issue creation. You can then use the lettering (or similar) to locate which ID this was from the rule.
    • I would note down the relationship between Question and ID, for future use.

You can then create Automation rules using the relevant ID(s)!

 


You can also re-run this process per field type, taking the different smart value options from the Proforma help page.

Let us know if this works for you!

Ste

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2022

Hi @Mergim Rexha 

AAA is the Question ID.

The reference matches how it's written on the Proforma help page - I'd recommend checking that out to see how I've referenced it here.

What else is not clear from my previous response? Happy to clarify any specifics :)

Ste

Jawann Swislow August 10, 2022

@Jack Brickey Any update on the timing of core support for Forms smart values? The workaround described in this thread is not worth the implementation and maintenance efforts for our use case.

We need to be able to easily send an email with all the information from a Form to an email address that is not registered in JSM.

Stephen Wright _Elabor8_
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 2, 2022

Hi @Jawann Swislow 

Best to vote/follow the feature request - check out: https://jira.atlassian.com/browse/JSDCLOUD-10697

Ste

Like # people like this
Jawann Swislow September 3, 2022

Thanks, done.

Chris Castro October 18, 2022

@Stephen Wright _Elabor8_ I located my Proforma smart values for a few form fields that are of type 'user' and inserted them into an automation rule to pull that form answer into a new ticket being created. Unfortunately, the smart value does not return any value.

For example:

{{issue.properties."proforma.forms.i1".state.answers.AAA.users.get(0).name}}

does not populate in the newly created ticket. But if I remove "name" from the string, it will populate the Id. Looking at the JSON, I do not that there is only an "id" element and none for "name." Is this possibly the reason why? Is there a workaround for this? I'd really like to be able to keep the field type on my form as users rather than simple text fields.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2023

Hi @Chris Castro 

Apologies for not coming back to this one, but I found a workaround for your need.

It's likely you're correct in relation to the "id", I also couldn't find a way to specify the name directly from the smart value - so instead I...

  • Created an additional user picker field
  • Entered the ID into there (using the smart value)
  • Then used the user picker field to print the user's display name as text instead

---

The rule should look something like this...

  • Trigger: <trigger here>
  • Action: Edit Issue
    • Field = User Picker Field
      • Value = {{issue.properties."proforma.forms.i1".state.answers.2.users.id}}
  • Action: Re-fetch issue data
  • Action: Edit Issue
    • Field = Text Field
      • Value = {{issue.User Picker Field.displayName}}

---

Let us know if this works (assuming it's still needed)!

Ste

1 vote
Shawn Giese May 18, 2022

Any update on "automation-forms support coming in the April timeframe"? Would be nice to use these values in automation.

Values like {{issue.properties."proforma.forms.i1".state.answers.AAA.text}} do not seem to be working.

Shawn Giese May 19, 2022

Got it, I was using a dropdown field in the Forms and the syntax to get the values was a little different.

Pieter Wouter Hartog
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.
August 15, 2022

@Shawn Giese What was the syntax you had to use for dropdown fields?

Mergim Rexha August 16, 2022

@Pieter Wouter Hartog 

You need to create a custom field and then link it in the form on the right side, otherwise it is currently not possible....

Regarding your question:
Create a custom field, enter the data there, then jump back to the form and add a dropdown module and link it to your customfield. Then you just have to figure out what your custom field is. You can do that by creating a request type and adding your custom field there, then go into the customer's view, open the developer console and you will find something like this: customfield_100124
The syntax is then: {{issue.customfield_100124.value}}

Shawn Giese November 24, 2022

Hi Pieter,  I think I gave my solution below (it was a while ago, sorry). If it is not working for you I can try and dig up the correct one. 

0 votes
Mergim Rexha August 16, 2022

Unfortunately, there is no update on this yet. You still can't trigger the data in a normal way from a form.

How I have solved this now, unfortunately, is that I have created custom fields, which I then link in the respective form in the respective field. This way I am able to trigger the content that the customer enters and use it in the automation.

0 votes
Mergim Rexha May 9, 2022

@Stephen Wright _Elabor8_ 

thank you for your feedback.
Unfortunately I have problems to understand the whole thing.
especially the topic with AAA.
What is AAA?
Is it for example the label? what I added in the form?
or do I have to assign a field key?

Could you please describe it in more detail as far as you can?

Shawn Giese May 19, 2022

AAA is the id number of the field that you are trying to pull a value from (field on the form). Apparently when Forms was a plugin (before Atlassian integrated it to their product) there was a View JSON button to see this but I think you still see the JSON with something like:
https://<yourserver>.atlassian.net/rest/api/2/issue/<jira-ticket-number>/properties/proforma.forms.i1

I think Stephen got around the JSON view by testing with multiple calls first, one for each field on the form (in his case 15 different calls, each one with an incremented id # from 1 to 15) and figuring out the id number by matching the output. 

We had dropdown form values to automate and that was even more complex since the form result is simply the position number of the choice... such as "3" to indicate the 3rd choice. We had to put that into a variable and pull the actual value shown in the 3rd position of the dropdown (with another smart field). 

So, if you can identify that your form field id (AAA in the example) is "2" then you could get at it with a call something like: 
{{issue.properties."proforma.forms.i1".state.answers.2.choices.get(0)}}

That is the the syntax for multiple choice in the forms. The link to proforma shows the syntax for other field types. Not robust though if tied to the location of the field. Debugging it is challenging.

Like Stefanie Jäger likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events