Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,640
Community Members
 
Community Events
168
Community Groups

expected Object

Edited

"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

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
TAGS

Atlassian Community Events