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());
//
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
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.