Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Google Code to connect Google Sheet with JIRA API KEY

ERIK GAUDIN
Contributor
October 2, 2019

 

Greeting, I was using "mylittleblue" script to push GSheet information into a Jira Ticket, but since July 2019, this methoud are in "phase out". How can i convert this method to the new API KEY method ?  (here bellow what i'm using)

 

 

 

var username = "myemailadress@mydomain.ca"
var password = "pw"
var CloudIdKey = "myapikeygeneratedfromjira"
var UserCredentials = username + ":" + CloudIdKey;
var headers =
{
"content-type": "application/json",
"Accept": "application/json",
"authorization": UserCredentials
};

//
// A final few options to complete the JSON string
//
var options =
{
"content-type": "application/json",
"method": "POST",
"headers": headers,
"payload": payload
};

//
// Make the HTTP call to the JIRA API
//
var response = UrlFetchApp.fetch(url, options);
Logger.log(response.getContentText());
//

1 answer

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2019

Hi @ERIK GAUDIN ,

As written in the Deprecation of basic authentication with passwords for Jira and Confluence APIs:

Atlassian Cloud sites have introduced support for API tokens to replace Atlassian account passwords for all Jira and Confluence APIs.

In other words: Basic Authentication with username and password has been replaced by Baisc authentication with email address and API tokens.

 

Therefore, it is just enough to replace the username with the email address and the password with an API token in your script in order to have it working as before.

 

For further details please see:

 

 

Cheers,
Dario

ERIK GAUDIN
Contributor
August 5, 2020

I was using a GForm.. that filles a GSheet (and the script start each time the GFrom task done).

 

On the Jira site, i was using a generic user (i called it "service user") to create the task. This part still working fine. But, in order to add the requester to the Jira task (so he can follow the task), i was using the e-mail adresses to fetch the JIRA ID, and then put the user as "watcher" or "requester" on the Jira Ticket.

That part not working anymore since the new API.

 

As i collect all e-mail adress during the GForm process, it was the easiest solution to assigned ticket. How can i acheive this now ?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, aafp, jira migration, marketing collaboration, end siloed work, streamline workflows, kerrie gottschalk, jira cloud admins, unified marketing, process visibility, team efficiency, cross-team collaboration

How Kerrie Gottschalk unified AAFP’s marketing team with Jira

At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.

Read the story
AUG Leaders

Atlassian Community Events