Forums

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

I can't update a Issue, when i execute code, my excel crash when i send the data with Put method

Alejandro Martin January 2, 2019

columnaIdJira = Sheets("Params").Range("B4")
sUsername = Sheets("Params").Range("B2")
sPassword = Sheets("Params").Range("B3")
'Se codifica las credenciales en Base64 para poder realizar la conexión con Jira correctamente
sEncbase64Auth = EncodeBase64(sUsername & ":" & sPassword)
'Cria uma Issue
With JiraService

.Open "PUT", ""correct url"/jiraproy/rest/api/2/issue/"correctissuekey"/editmeta", False
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Authorization", "Basic " & sEncbase64Auth
sData = " { ""fields"" : ""summary"": """ & sProject & """ }"
.Send (sData)
sRestAntwort = .ResponseText
sStatus = .Status & " | " & .StatusText
End With
Set JiraService = Nothing
' Tratamento JSON
sAux = Replace(sRestAntwort, "{", "")
MsgBox sRestAntwort
Aux = Replace(sAux, "}", "")
sAux = Split(sAux, ",")
sAux = sAux(1)
sAux = Split(sAux, ":")
sAux = sAux(1)
sAux = Replace(sAux, """", "")
Range("K" & iPuntero).Value = sAux
'Gestionamos las posibles respuestas que podemos recibir de Jira
If sStatus = "201 | Created" Then
sStatus = "petición generada correctamente"
MsgBox "peticion generada correctamente: " & sAux
End If

End Sub

1 answer

1 vote
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2019

Hello Alejandro and welcome to the Community!

When Excel crashes, is there an error displayed? Also check the event log to review any errors or warnings. Please let us know if any are present.

If you’re attempting to integrate Excel with Jira, there are already plugins available within the marketplace which do just this. You may find a preset search here for the Atlassian Marketplace for Excel Connector.

Something to be aware of is this is a support community and not often browsed by developers. We want to ensure you get the responses and answers you need so we would suggest you check out the Developer Community. The Developer Community may have more available resources to answer or address your developer questions.

Regards,
Stephen Sifers

Alejandro Martin January 9, 2019

Thanks Stephen I don't know how see the events register. I do my answer to on  community for developers. Thanks a lot for try to help me and sorry for my bad English I'm only a student

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer