Hi
I am trying to update a custom field using the REST API.
Sending
json = {"fields": {"customfield_20612": "New"}}
url = https://xxx/jira/rest/api/2/issue/{issueNumber}
Getting back
status = 1223
no response text
Err.Description is 'Operation aborted'
and it all comes to a stop.
Can anyone help?
Updated
The call updates the record in JIRA before aborting
VBA code being used
Public Function putToJira(ByVal restUrl As String, ByVal inputJSON As String, Optional ByVal usePassword2 As Boolean = False) As Variant
Dim oJIRA As clsRESTful
Dim nameAndPass, result(2, 1) As Variant
Dim status As Long
Set oJIRA = New clsRESTful
nameAndPass = moduleMiscOps.getNameAndPassword(usePassword2)
With oJIRA
.authUrl = JIRA_AUTHORISE_URL
.jsonString = inputJSON
.url = restUrl
.userName = nameAndPass(NAME_PTR, 1)
.Password = nameAndPass(PASS_PTR, 1)
.putData
result(2, 1) = .jsonString
result(1, 1) = .status
End With
Set oJIRA = Nothing
putToJira = result
End Function
Public Sub putData()
Dim openString As String
openString = Trim(sURL)
With JiraService
.Open "PUT", openString, False
.setRequestHeader "Content-Type", "application/json"
.setRequestHeader "Accept", "application/json"
.setRequestHeader "Authorization", "Basic " & EncodeBase64()
.send sJSONString <===== IT FAILS HERE
sStatus = .status
If .status <> 401 Then
sJSONString = .responseText
Else
sErrorResponse = .responseText
sJSONString = INVALID_CREDENTIALS
End If
End With
Set JiraService = Nothing
End Sub
Ric