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,360,137
Community Members
 
Community Events
168
Community Groups

Fill in ProForma forms programatically

Dear community,

 

I start by giving some context: I would like to create a script that will create jira tickets combined with a form.

Using the Jira API I was able to create a ticket and also I was also to create and attach a ProForma form to the ticket.

Now, I want to fill in programmatically the form fields before submitting the form (which is possible using the Proforma Rest API).

The problem is that I did not found any Rest api to fill in the form programmatically.

I've seen also that the forms are part of the issue properties; for ex /issuse/xxxxx/properties/proforma.forms.i1.

I have tried to get the json representing the form from properties, to modify it by  injecting in the json the fields values for the from and put it back. It does work from the API point of view but when i refresh the ticket in the browser, the form had disappear.

I don't think this is the way to go because i see that the form have also a hash field.

 

Any idea to fulfill this is more than welcomed.

thx,

Adrian 

 

 

1 answer

1 accepted

0 votes
Answer accepted

Thx for your answer.

In the ProForma Rest api there is no api entry to fill in a form, just to create a form, get the answers and submit.

it sounds weird but it's true.

Adrian

According to this ProForma documentation, you can link a question on a form to a custom field in Jira.

Have you tried that method, then use Jira's REST API to update those custom fields for that issue and hence update the corresponding questions in the form for that issue?

Thx for the reply; indeed I have tried this manually and it works.

Most probably can be done also programmatically.

So the solution is to link the form fields to custom fields at design time of the form, then when the jira ticket is created, this custom fields are filled in and when the form is attached to the ticket automatically the form fields are filled in (because are linked to the custom fields).

 

thx,

Adrian

No problem.

Now that ProForma has been acquired by Atlassian, the REST APIs will probably merge and that 'double handling' of the fields will might be phased out.

Might be :)

Can someone explain this in detail? I am able to access the Jira API to create a ticket and i filled the mandatory fields. Then i try to call 

/rest/proforma/1/issue/$JIRA_KEY/form/$REQ_NO/submit"

but my ticket gets closed immediately , because it wasn't created through ProForma

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,001 views 18 31
Read article

Atlassian Community Events