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

Reading a Forms(ProForma) field value without the JSON tab

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

 

Forms API for Cloud:

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:

 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.

Workaround steps:

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:

Screen Shot 2022-08-03 at 12.19.37.png

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

About the Choice Fields property limitation, we do have an item in our development backlog aimed at improving this as well:

  •  JSDCLOUD - 13694 - Forms Properties: Able to access the information and not the ID of choices fields responses

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...):

Screen Shot 2022-08-03 at 12.26.45.png

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:

15 comments

Amanda Ward August 8, 2022

Does this actually work now? All the reviews in the marketplace say this app doesn't work. 

Like Bruno Altenhofen likes this
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2022

Hey @ama

I hope your week is going well!

The ProForma app isn’t more available on the Atlassian Marketplace. As part of the integration between ProForma and Atlassian, it is now natively available in Jira Service Management projects as the new Forms.

Also for more information on the new availabilities of Forms for JSM, JWM, and JSW products, we will be updating our users via email and also our roadmap here: Atlassian cloud roadmap

Thanks! :D

Charles Trilha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2022

Nice Article!

ProForma Legend, Bruno!

Like # people like this
John Funk
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 10, 2023

Hi @Bruno Altenhofen  so it is just references to these values? Or can I actually use the in the automation? For example if my automation rule looks like: 

Screenshot.png

Shouldn't that put the date from that question on the form into the Due date when the issue is created? Because if it should, that is not working for me. Same with Text fields. Is there something I am missing? 

Like Kalin U likes this
John Funk
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 15, 2023
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2023

Hey @John Funk 

Apologies for my delay in responding to you (I was a little off in the Atlassian Community these last few days). So you can use Forms data with Automation for Jira without having to link them to Jira fields. The date field in the forms unfortunately has a limitation in that it doesn't respect Jira's default date and ends up converting it. But we have a bug already open for that:

So, to further clarify this matter, I went ahead and created a screen recording demonstrating how to use the form's date and date/time field without needing to link them to a Jira field in an automation rule:



I hope I was able to give you a clear overview of this case and if you have any questions or need further assistance, just let me know and I'll help you!

Thanks,

Like Kalin U likes this
John Funk
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 19, 2023

Hi @Bruno Altenhofen  - Super - that worked!!

Sorry, one more thing. Can you give me more detailed guidance on how the select lists should work? (including single pick list, multi-pick list, radio buttons, and checkboxes!). I want to be able to do the same thing - select the value from the form and have it populate another field - probably just a Paragraph or multi-line text field is where I would place the value. 

Thanks in advance!!

Like Bruno Altenhofen likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 3, 2023

Hi @Bruno Altenhofen  - Any more feedback? 

Like Bruno Altenhofen likes this
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2023

Hey @John Funk 

So about the select lists, based on the present design, when it comes to handling/recording values chosen in choice lists(dropdowns, checkboxes, etc), ProForma keeps the choice list field ID in the JSON and returns the associated value when the form is displayed. Another bit of info you may want to know is that currently due to only getting the ID for the choice chosen(and not the answer itself), unfortunately accessing Choice list values does not work for smart values. This is a known limitation between ProForma and A4J.

Therefore, the main issue here is that the Jira Form Choice Fields type doesn’t have the "text" corresponding to the id of the option. That's why at the moment it is not possible to get the "text" but only the "choice id". For example, below I show the property of a Text Field compared to a Choice Field:

"state": {
    "visibility": "i",
    "status": "s",
    "answers": {
      "1": {
        "text": "Bruno"
      },
      "2": {
        "text": "",
        "choices": [
          "1"
        ]
      }
    }
  },

Note that the Choice Field that is represented with id 2 only has the id of the option that was chosen which is the id number "1" and the 'text' property from the Choice Fields will always be empty ("text": "",).

With that in mind, the only possible workaround is using an automation rule to override the "choice id". I made a video showing an example of how to achieve this scenario, please refer to the link below:



I comprehend that this might not have been the solution you were looking for and I wish there were more I could do on my side to address this for you.

Also, allow me to share with you these feature requests that we have related to this topic:

Please let me know if I can be of any more help!

Thanks,

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2023

Hi @Bruno Altenhofen  - though not ideal, it is definitely something that I can use and implement. Thanks for sharing!!

Will there be a Forms team from Atlassian at Team '23? I would love to meet some of you in person!

YY哥
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2023

 

  • 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

     


Then how to use jira smart value to get the selected choice value? 

Like Mateus Martins likes this
Chetan Hassarajani August 31, 2023

Hello,

I have a form where i am asking the users what do they need. This is a checkbox. They can order desktop or laptop or phone or headset all 4. How do i use the entity id to find out which ones are checked. Here is what the JSON looks like.  What will follow this: 

 

{{issue.properties."proforma.forms.i1.state.answers.2.

 

 

      "2": {

        "type": "cm",

        "label": "I want to order the following:",

        "description": "",

        "validation": {

          "rq": true,

          "mns": 1

        },

        "choices": [

          {

            "id": "1",

            "label": "Desktop, monitor and/or accessories",

            "other": false

          },

          {

            "id": "2",

            "label": "Laptop, tablet and/or accessories",

            "other": false

          },

          {

            "id": "3",

            "label": "Smartphone and/or accessories",

            "other": false

          },

          {

            "id": "4",

            "label": "Teams headsets",

            "other": false

          }

        ],

Mateus Martins October 5, 2023

Hi @Bruno Altenhofen

Are you guys planning on making it possible to retrieve the selected choice value (issue.properties."proforma.forms.i1".questions.choices)?

If so is there a feature request for me to follow up with?

Cheers

Like # people like this
Fabian Dengel February 20, 2024

Great writeup @Bruno Altenhofen , much appreciated insight and very helpful for use in Automation!

Unfortunately, the redundant mapping of choice values makes it very tricky to maintain a single-source-of-truth, so we are almost forced to fall back to mapping to a custom field and set the values there (which are then easily extracted via CF smart-value). To add on to @Mateus Martins previous comment: Any updates on that front or a request you could point us to?

Again, many thanks for sharing your valuable knowledge regarding the "under the hood" attributes of ex-ProForma :)

Cheers,
Fabian

Like Mateus Martins likes this
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2024

Hello @Fabian Dengel 

Thank you for your kind words! :D

I'm sorry to be the bearer of bad news here, but at the moment isn’t possible to manipulate the Forms Choices fields in this way.

Therefore, I've created a feature request related to this topic for our development backlog aimed at improving this as well:

I'll also update this article with this feature request.
@Mateus Martins FYI

Thanks guys!

Like Fabian Dengel likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events