When I want to update an issue of the jira with visual basic my excel crashea

-1
introducir el código aquí

sFechainicio = 2018 - 6 - 5             sFechafin = 2018 - 6 - 5             sLabel="a"             sName="randomname"             sProject="updatetest"             sComponent="SPR"             sSummary="qqq"             sDescription="qq"             sHoras = 10             sHours = sHoras * 60 sID = Range ("A6"). Value

'Param Sheet parameters necessary for connection to Jira are collected     columnIdJira = Sheets ("Params"). Range ("B4")     sUsername = Sheets ("Params"). Range ("B2") 'correct user     sPassword = Sheets ("Params"). Range ("B3") 'correct password     'The credentials are coded in Base64 in order to make the connection with Jira correctly     sEncbase64Auth = EncodeBase64 (sUsername & ":" & sPassword)     'Cria uma Issue     With JiraService

    .Open "PUT", ""url"/jiraproy/rest/api/2/issue/"issuename"/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

    
asked by Alejandro Martin Marques 02.01.2019 в 09:32
source

0 answers