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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,658
Community Members
 
Community Events
176
Community Groups

Get Value form Jira Form

Edited

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 Feb 03, 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 

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 Feb 03, 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

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 Feb 03, 2022

Yes, that would be my take away.

Like Mergim Rexha likes this

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

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

@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.

Hi @Jawann Swislow 

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

Ste

Like Jawann Swislow likes this

@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.

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.

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

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

@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}}

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. 

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.

@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?

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events