You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
This workaround is meant to help customers who were used to working with the JSON tab provided by ThinkTilt(ProForma) and which is now being modified to use in Jira Forms. And also, to help new Forms customers to be able to get the forms fields ID.
As this feature is being changed and probably will bring support to Automation for Jira to access form contents with SmartValues. You can use the Entity Property Tool for Jira to be able to inspect the form data. This should allow you to continue to build your automation, for example.
Note: This tool is not officially supported, so please be careful how you work with these properties as you can easily break a form by changing the JSON.
Therefore, if you don’t want to use the Entity Property Tool for Jira and prefer to use the Proforma API, you can access the structure using the API link below:
https://<yourCloudURL>.atlassian.net/rest/api/2/issue/<issue-id>/properties/proforma.forms.i1
Tip: The "i1" is the number of the form attached to the ticket. So if you have 3 forms attached and want to access the second, it will need to use "i2".
Important related documentation:
Use forms in Jira Service Management
How AFJ works
Smart values
Work has already started on the new Forms API functionality and we now have some experimental APIs available for use. So now Marketplace Partners can already integrate forms into their products.
For more information, please refer to the features below:
JSDCLOUD-10671 - REST API for ProForma/Forms in Jira
Note: Forms API are now available and documentation is available here. We are continuing to work on the functionality available which is why this issue remains In Progress.
With the Entity Property Tool for Jira installed it only will be needed to add the form, that you desire to get the IDs, in a ticket and go into the Entity properties tab, as I show in the screenshot below:
The structure to access data, where AAA is the question ID number (not the Question Key defined in the form builder) is:
Text/Email/URL/Number Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.text}}
Date Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.date}}
Time Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.time}}
ID of a user: {{issue.properties."proforma.forms.i1".state.answers.AAA.users.get(0).id}}
Choice Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.choices.get(0)}}
Note this will only return the ID associated with the choice rather than the text.
The text of the selected choice value is stored is difficult for Automation for Jira to retrieve. It is stored as:
issue.properties."proforma.forms.i1".questions.choices
So, on the Entity property box, you will see: "proforma.forms.i1", "proforma.forms.i2"(it will probably be "1", which is a reference to the first form in the list, if it is the second form, it will be "2" then "3" and so on...):
Using a code editor like Sublime you can paste the form properties and look for the fields that you desire and get the IDs, as I show on the screen recording below:
Bruno Altenhofen
13 comments