expected Object

changjinsheng January 3, 2022

"rest/api/3/issue/xxx/transitions

when i use above api to transition my issue

i got an error

"

{
    "errorMessages": [], 
    "errors": {
         "fixVersions": "expected Object"
    }
}

"

my params is 

"

{
    "transition": {
         "id": "5"
    },
    "fields": {
        "fixVersions": [1]
    }
}

"

Could anyone tell me how to modify the params?

1 answer

0 votes
PaulM August 12, 2022

Did you ever figure this out?  If not, I'll supply how I got it to work.  Keep in mind that I'm firing this from within Jira's automation, but the JSON payload structure is basically the same.


{

"fields": {

"fixVersions": [

{"name" : "{{now.format("yyyy.MM")}}"}

]

}

}

 We use a format of "yyyy.MM" to name our Releases, so this month's would be 2022.08.  This worked for me.

In your example, if your Release version is named "1", your paylload would be 

{

    "transition": {

         "id""5"

    },

    "fields": {

        "fixVersions": [{"name": "1"}]

    }

}

Suggest an answer

Log in or Sign up to answer