JIRA REST API getting status 1223

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

2 answers

Hi,

I am facing more or less the same problem:

I am doing a transition of an issue via REST API implemented in an Excel. The transition of the issue is done correctly, but status code is not 204 as expected, but 1223 "Unknown error" ...

As a workaround I state "On Error Resume Next" before the transition call, but that's not a very elegant way wink

Just wanted to know, if this is a known error (we are running JIRA V5.2), then my workaround is more or less the "correct solution".

thanks + regards
Ludwig

0 vote

Hi,

got the same problem. Solution:

Dim JiraService As New MSXML2.ServerXMLHTTP60

instead of

Dim JiraService As New MSXML2.XMLHTTP60

Regards

Peter

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

63 views 2 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you