Here how i use the GScript :
Gform ---> GSheet --- > GScript ---> JIRA
In GForm, i took the user e-mail direct from there. And ask for some usual variable (using dropdown menu)
The variable "AssignedSupervisor" was something set in the GForm. So i use the user ID found in JIRA, and
simply re-use that.. exemple, if the user named "Robert Aly" and his Jira User Key is "robert.aly", i simply use
a dropdown field with that value. Once the user finish the form, the script is trigger by the GForm and create the ticket, and send him e-mail contain the JIRA URL to this ticket.
1 or 2 weeks ago... all seem not working. Something seem to have happen, preventing the Script to filled "assignee" and "reporter"
var token64 = Utilities.base64Encode(USER_AUTH + ":" + API_TOKEN);
var headers = {
"content-type": "application/json",
"Accept": "application/json",
"Authorization": "Basic " + token64
};
var searchUsersOptions = {
"content-type": "application/json",
"method": "GET",
"headers": headers,
"muteHttpExceptions": false
};
var searchUsersResponse = UrlFetchApp.fetch(searchUserUrl, searchUsersOptions);
var searchUserResults = JSON.parse(searchUsersResponse.getContentText());
if (searchUserResults.length != 1) {
Logger.log(searchUsersResponse);
throw Error(requesterEmail + " cant find email or more than one find with that email.");
}
var data = {
"fields": {
"project": {
"key": projetkey
},
"priority": {
"name": UrgencePrio
},
"duedate": formattedDate,
"assignee" : {"name" : AssignedSupervisor},
"summary": ProjectNameWithAssignee,
"customfield_12178" : WBSNumberBudgetEst,
"description": Descriptionetdoclink,
"labels" : etiquettesautiliser,
"reporter": {
"emailAdress": requesterEmail
},
"issuetype": {
"name": TaskType
I got those error now
{ [Exception: Request failed for https://mydomainname.atlassian.net returned code 400. Truncated server response: {"errorMessages":[],"errors":{"reporter":"Reporter is required."}} (use muteHttpExceptions option to examine full response)] name: 'Exception' }
Anyone know how to adress those issue ? I give full Admin right to the user attached to the Script, without better result (so it's not a right issue)