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

Jira Automation - sent Forms data to a Webhook as JSON

Hannes Vorholz September 19, 2022

Hello together, 

i am trying to sent the proforma form data as a JSON object to a web hook. 

first try was to send it as smartvalue in the body

{{issue. properties."proforma.forms.i1"}}

using that a get data out. but my external system (azure logic app) replies with invalid JSON data. 
next i tried to encapsulate the data from the smartvalue  like this:

{"content":"{{issue. properties."proforma.forms.i1"}}"}

This worked but the other end did not show valid JSON. 
It Shows same data as i would use the Log Action Automtaion rule.

so how can i get JSON Object Data of a issue properties field??

 

Here some screenshots of of my webhook actions.

 

putting dato into the LOG

2022-09-19_13h35_56.png

RESULT no valid json:

2022-09-19_13h37_28.png

 

using the webhook with data encapsultaion into a simple json string

2022-09-19_13h39_00.png

the external system received also kind of quote-stripped json which is not valid.

 2022-09-19_13h41_12.png

 

I also tried all other web request body types, but the other do neither include custom field data nor formdata.

2022-09-19_13h42_04.png

 

thanks in advance for all your suggestions.

 

Regards

Hannes 

 

2 answers

0 votes
Joseph Chung Yin
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 19, 2022

@Hannes Vorholz -

To supplement what @Frederic Chartrand mentioned.  At this time, it is my understanding that Atlassian is still looking at providing FORMs API usage in the CLOUD env.  I would recommend you the following options for your to consider -

1) You can try to map your FORM's elements (ones are important for your issues) to actual Jira custom fields.  Then you can extract the issue content via JSON since what are captured in the FORM are now associated with your issues as actual issue data and not just as an attachment.

2) Submit formal request to Atlassian Support (https://support.atlassian.com) to see if they have any latest updates on your question.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

0 votes
Frederic Chartrand
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.
September 19, 2022

Hi Hannes,

 

From the screenshots, I guess you're in a cloud environment and unfortunately there's no API now working with Forms as of now.

This ticket is open with Atlassian : https://jira.atlassian.com/browse/JSDCLOUD-10671

I found this page for DC/Server version of JSM, but you need to request access to their Confluence :

https://docs.thinktilt.com/proforma/proforma-api 

So it seems that, for now, this functionality can't be used.

Hope this helps.

Have a nice day

 

Frederic Chartrand

FMX Solutions - Gold Solution Partner

Giedrius Daugmaudis January 27, 2023

Forms live in separate property until it's streamlined, you could do something like we do:

Dump all form answers into jira field ( we send it to json (edit screen visible ) cf, via post action in a workflow with scriptrunner) using API rest/proforma/1/issue/${issue}/form/1/answers. 

Make sure the output JSON ready with groovy.json.JsonOutput or something similar.

When you make a web call, just include custom body { {{issue.customfieldxxxx}} }

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events