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

How to edit the forms data connection to show the values from my API call

Marcus Jones
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2023

I'm wanting to use a google sheet as a simple database to store user names. This way other departments can simply update the spreadsheet. I've the google sheets API so that I can call my sheet and pull cell values. This all works great but when I get to the "Configure" portion of setting up the data connection in Jira my only options are the "range" and "majorDimension". I will say that I am no expert at making API calls so it could be me but my call returns the cell values as it should. The issue is that when it comes to displaying those values in a form via the data connection I just get basically the parameters but not the actual values. I'm also having no luck trying to edit the "Items" section to pull the values that I want. GoogleSheetsConnection.pngGoogleSheetsConnection2.pngGooglesheetsconnection3.png

1 answer

1 vote
Pankaj Jangid
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 18, 2023

To do this, you'll need to create a custom data source that retrieves the data from your Google Sheet and returns it to the form. That you are already doing.

Here are the steps you can follow to extract the values from a custom data source:

  1. In Jira Service Management, navigate to the "Forms" section and click "Create new form".
  2. In the form editor, click "Add new data source" and select "Custom" from the list of options.
  3. In the "Configure" dialog, give your data source a name and enter the URL of your Google Sheet API call in the "Endpoint URL" field.
  4. Under the "Request" section, set the "Method" to "GET".
  5. If your API call requires any headers or query parameters, you can add them under the "Headers" and "Query Parameters" sections.
  6. Under the "Response" section, use the JSONPath expression language to extract the values you want to display in your form. For example, if your API call returns a JSON object with a "name" property, you can use the expression "$.name" to extract that value.
  7. Once you've configured your data source, click "Save" and then "Test" to make sure that it's retrieving the data you expect.
  8. Back in the form editor, you can use the "Insert field" button to add fields to your form and then configure each field to use your custom data source. When you select your data source, you should see a list of the values that your API call returned, and you can choose the one you want to display in the field.

I hope this helps.

Patricia Francezi
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2024

Sorry for bothering here, but, im not able to find the Add New Data source im my screen, is this kind of a bug?

image.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events