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

Exporting response data from Jira Forms (including fields not linked to Jira fields)

Hi all,

I need to update a script that's meant to pull data from Jira dynamic form responses for all requests in a project and output as xlsx. Following the Forms on Issue & Forms on Project KBs, I can do it for one issue in a project, but I want to be able to do it for all issues in a project if doable. I figured looping through all issue keys in a project would do the trick:

# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json

ticketID = 1

url = "https://api.atlassian.com/jira/forms/cloud/<cloudID>/issue/PROJ-" + str(ticketID) + "/form/e71f55a3-d06d-4997-aad7-72b61fd166f4/attachment"

auth = HTTPBasicAuth("username@example.com", "<atlassianAccountAPIKey>")

headers = {
"Accept": "application/json",
"X-ExperimentalApi": "opt-in"
}


# 239 issues in project PROJ
while ticketID < 239:

response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
ticketID += 1

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))


Currently, running this script throws the following error output:

ibalas@HV-IT-IBalas ~ % /usr/local/bin/python3 /Users/ibalas/.rest-client/responses/raw/BulkExportREQSJiraForms.py
{
"errors": [
{
"code": "FORM_NOT_FOUND",
"context": [
{
"id": "PROJ-1",
"type": "issue"
},
{
"id": "e71f55a3-d06d-4997-aad7-72b61fd166f4",
"type": "form"
}
],
"detail": "The provided form ID was not found.",
"status": 404,
"title": "Form Not Found"
}
]
}

 

So now, I gotta see if there's a way to look up all the form UUIDs for the forms associated to a JSM project...and I wonder if the formID could instead be an array of the formIds of All REQS forms...then add a condition before the request to check which particular form is associated to the issue (if any), but I'm pretty stuck on how to do this...Is there a way to pull the form UUIDs for all forms in a project (rather than just one form) in the same script as above?

Any help would be greatly appreciated.

-Ian

1 answer

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.
Oct 27, 2023 • edited

@Ian Balas -

I am not an expert on REST APIs development, I think you should reach out to Atlassian Support (https://support.atlassian.com) and raise a technical support case.  The support team should be able to route your case to their development team to assist further.

Looking at the REST APIs reference link, it seem this experimental API - " Get project form index" - will get you a list of all the Forms associated within a project - https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-project/#api-project-projectidorkey-form-get  Have you already look into it?

I know that in the Community, there are many technical developers and hope they can provide you with a possible implementation to achieve your ask.

Sorry.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

No worries. Thanks for the links, though! I'll reroute this question to them.

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