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:
As a workaround to the feature request "Forms Automation: Automation to control the forms visibility", this article is meant to help users who want to use the new experimental features of the Forms API to automatically change the form visibility between internal and external.
To change the form visibility to external when an issue is transitioned:
- The web method will be a PUT:
PUT /jira/forms/cloud/{cloudId}/issue/{issueIdOrKey}/form/{formId}/action/external
- The cloudId will be your Cloud ID and not your Org ID. The easy way to get the cloud id is to go to https://<instance>.atlassian.net/admin/jira-service-desk/portal-only-customers. You will get the Cloud id in the URL (e.g.: https://admin.atlassian.com/s/<cloud_id>/jira-service-desk/portal-only-customers)
- The issue ID or issue Key that you are using. To add the issueId or issueKey dynamically, you can use the smart value {{issue.id}} or {{issue.key}}
- The formId will be in the universally unique identifier "uuid" format. To get it you can use the Forms properties structure below:
https://<yourCloudURL>.atlassian.net/rest/api/2/issue/<issueId>/properties/proforma.forms
- To add the formId dynamically, you can use the smart value below:
{{issue.properties."proforma.forms".forms.uuid}}
- The automation rule will be as shown in the screenshot below:
- The web method will be a PUT:
PUT /jira/forms/cloud/{cloudId}/issue/{issueIdOrKey}/form/{formId}/action/internal
Note: To call experimental methods the "
X-ExperimentalApi" and "opt-in"
header must be provided on the web request headers.
This workaround will work as shown in the screen recording below:
Bruno Altenhofen
Atlassian Engineer - The guy from Proforma(Jira Forms)
e-Core
Krakow - Poland
1 accepted answer
5 comments