Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing request-type during issue-type-move via automation-rules not working but reporting success

Sascha Kobus September 23, 2021

Hi,

I am trying to change a request-type during an issue-type change automatically (basically what is wanted here: https://jira.atlassian.com/browse/JSDCLOUD-1835/).

My approach is automation-rule-based:
Trigger: Issue-type change (any)
Condition: specific issue-type
Action: Edit request type with specific type from that issue-type

Now when using a move-operation to change the issue-type all my rules for this case are triggered. But only one succeeds due to the specific condition. The succeeding one also shows "success" in the status from the audit-log ("Field value changed").
But when I look at the moved issue the request-type field has not changed at all / is empty.
I tried changed another field value by these rules ("labels") and that worked just fine. Just the request-type ist giving me a hard-time here. Probably because it is a custom field?

I also looked into advanced edit-issue-action and setting the custom field value via json / additional-fields syntax. But I am not sure about which value to supply to my custom field for I see no "allowed values" when pulling the metadata for that field via api-get-request:
>
"customfield_10001":{
  "required":false,
  "schema":{
    "type":"sd-customerrequesttype",
    "custom":"com.atlassian.servicedesk:vp-origin",
    "customId":10001
  },
  "name":"CustomerRequestType",
  "key":"customfield_10001",
  "operations":[
    "set"
  ]
}
<

Anyone else at this point or beyond? Any ideas why the automation rules reports success but I cannot see the changed field value?
Thanks for any help!

1 answer

1 accepted

2 votes
Answer accepted
Sascha Kobus September 24, 2021

Solved by getting my request-type-id's via api-call => https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-requesttype/#api-rest-servicedeskapi-requesttype-get

Then using automation-rules with an edit-issue-action (advanced):
>
{
  "fields": {
    "customfield_xxxxx": "$idFromApiRequest "
  }
}
<

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events