Hi,
We are using Jira software. I have been testing the new Forms feature.
And I could not find a way to reopen a submitted form when the issue's status changes.
We have Jira Automation and JMWE, I can get the form properties like this
But I need to reopen this form when issue is transitioned. Any ideas?
Thanks,
Found a solution to this - you'll need to setup a few things:
1. GET request to find the global issue ID
https://<<your site here>>.atlassian.net/rest/api/2/issue/{{issue.key}}
ID: {{webResponse.body.id}}
2. PUT request to unlock the form
https://<<your site here>>.atlassian.net/gateway/api/proforma/cloudid/<<your cloud id>>/api/3/issue/{{id}}/form/<<form number>>/unlock
The form number is the order in which the form was attached, e.g. if the form was the second form attached, then this number should be 2
Hi Jennifer,
We dont have scriptrunner, we just have jmwe. Are you familiar with it? If so, could you be more specific, because I am not sure how to implement this and I have never used Rest api.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aslihan / Raphael,
This is a web request in automation. Unfortunately, I haven't used JMWE before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this process allowing you to reopen forms for additional editing? That is the functionality my project needs for forms at the moment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jennifer, are you suggesting to create two web requests in Automation ? One for the GET and one for the PUT ? I'm trying your solution but not sure exactly how to structure it.
Thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind ! I found out how to do it.
You have to create 2 web requests one after another
1) Get
Web request URL : /rest/api/2/issue/{{issue.key}}
(dont forget the authorization in base 64 : email:apitoken)
2)Put
Web request URL :
gateway/api/proforma/cloudid/"siteid"/api/3/issue/{{webResponse.body.id}}/form/1/unlock
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this process works to reopen forms after a customer has submitted/saved? Want to get a clear idea of what function is actually happening before I invest time into learning this and implementing it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The GET part works, but PUT is throwing a 404 error. I'm using JSM Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you correctly replace site id ?
Don't forget to select Delay execution of subsequent rule actions until we've received a response for this web request in the 1st rule also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to Atlassian this solution works when forms were ProForma but integrating them into Jira Service Management required changes that seem to make this option not viable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This still works now, it's just that the API is slightly different compared to before - I've also realised you can pull the issue ID directly using smart values, so it saves you a second API call:
https://<<your site here>>.atlassian.net/gateway/api/proforma/cloudid/<<your cloud id>>/api/3/issue/{{issue.id}}/form/<<form number>>/unlock
The easiest way would be to open Developer Tools in your browser (F12), unlock your form and get the cloud id from the PUT request you see there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a possibility to validate whether a form/<<form number>> exists?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it doesn't exist, i.e. say you only have 2 forms but you call the api using value 3, the response will be 404 not found with the following payload:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jennifer Luo I created the automation as you described on 12.04.22 as a GET and it works fine, however it is not unlocking the form. I tried to change the GET to POST, and even PUT but I get an error 'method not allowed'. I'm well aware it's user error as I'm not great with API requests. Could you tell me what the final piece is that I need to do so that the automation acutally unlocks the form for a customer on the portal to edit? Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure you have your Authorization header details correct, I don't see anything else that could be missing!
Also make sure there is in fact a form attached to the issue - if not, it will not work since nothing is going to be unlocked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jennifer Luo I finally for it to work, and yes part of the error was my authorization header, thank you for all your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For future reference this is the URL you should use (as of 13/02/2023):
PUT {{baseurl}}/gateway/api/proforma/cloudid/{{cloudId}}/api/3/issue/{{issue.id}}/form/1/reopen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is {{cloudId}} a working smartValue now? Or did you just write that to stay in the syntax?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cloudId is not a smartValue from what I know, that is still something you need to grab yourself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not, but it also does not change. So you can hard code it in the URL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+1, we are also having issues and can't find a workaround
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aslıhan Paksoy Would you be willing to share screenshots of how you set up your Jira Automation?
Thank you!
Apologies entered on wrong thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jennifer,
I have tried your solution with Jira Automation and it worked like a charm! Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aslıhan Paksoy Would you be willing to share screenshots of how you set up you Jira Automation?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.