Hi All,
I have to update issue status using jira rest services below request payload.
{
"update": {
"comment": [
{
"add": {
"body": "Bug has been fixed."
}
}
]
},
"fields": {
"assignee": {
"name": "bob"
},
"resolution": {
"name": "Fixed"
}
},
"transition": {
"id": "5"
},
"historyMetadata": {
"type": "myplugin:type",
"description": "text description",
"descriptionKey": "plugin.changereason.i18.key",
"activityDescription": "text description",
"activityDescriptionKey": "plugin.activity.i18.key",
"actor": {
"id": "tony",
"displayName": "Tony",
"type": "mysystem-user",
"avatarUrl": "http://mysystem/avatar/tony.jpg",
"url": "http://mysystem/users/tony"
},
"generator": {
"id": "mysystem-1",
"type": "mysystem-application"
},
"cause": {
"id": "myevent",
"type": "mysystem-event"
},
"extraData": {
"keyvalue": "extra data",
"goes": "here"
}
}}
In actor tag i have to provide details for actor.how to find actor details in my jira system.
Could you please help.
I have one more quick question
what is generator ,cause,extraData details in above request payload.
Hello,
The actor is the user under whom you perform the rest call. Description of generator, cause, extraData you can find here:
Do not fill the historyMetadata part. It must work fine without it.
Thank you Alexey Matveev,
In request payload trasition id is sending like this
"transition": {
"id": "3"
},
getting below error:
{
"errorMessages": [
"Transition id '3' is not valid for this issue."
],
I have opened workflow.In my instance i could find any transition id.please find attached screen .where i can get this transition id.
please find attached workflow screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to the text tab (not Diagram). You will see numbers near transitions. That would be the transition (action) id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can pass only those fields, which are present on the screen, which you defined for the transaction. I guess, your transaction does not have any screen. That is why omit the fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got transition id .I am getting below error.
Could you please help me on this.
And provide me any simplified request payload for json.
{
"errorMessages": [],
"errors": {
"resolution": "Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown.",
"assignee": "Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown."
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Nageswara Rao Koppisetti
As @Alexey Matveev shared in his response , you can only submit the fields which are part of the transition screen for a particular transition. In your case the transition id is 3 and for this transition you have to check if the transition screen exists and if it doesn't then you should not enter the field values. From the docs
If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.