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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,552,417
Community Members
 
Community Events
184
Community Groups

Submitting or reopening a Form using Automation and API

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: Lock/submit/reopen form on status change", this article is meant to help users who want to use the new experimental features of the Forms API to automatically submit a form or reopen it.

 

Workaround steps:

  • Create an Automation rule:
    • It will be needed to create an API token for the Web Request process. The Web Request needs your credentials and an API token encoded with base64:Screenshot 2023-05-22 at 18.29.21.png
    • For more information about this procedure, please refer to the documentation below:
        - Automation for Jira - Send web request using Jira REST API
    • We need to use the new API functionality of submitting or reopening a form in a Put web request. For example:
      • To reopen a form:

        PUT https://api.atlassian.com/jira/forms/cloud/{cloudId}/issue/{issueIdOrKey}/form/{formId}/action/reopen

        - The web method will be a PUT:

        - 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

        Screenshot 2023-05-22 at 17.48.05.png

        - 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:Screenshot 2023-05-22 at 17.59.44.png

      • To submit a form:

        PUT https://api.atlassian.com/jira/forms/cloud/{cloudId}/issue/{issueIdOrKey}/form/{formId}/action/submit

        - The steps will be the same as above and the automation rule will be as shown in the screenshot below:Screenshot 2023-05-22 at 18.09.49.png

          

 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:

2 comments

Bruna Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2023

Amazing article!

Charles Trilha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2023

Great article, Proforma legend Bruno!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events