Hi all
I've just migrated from JIRA server to cloud instance using team managed projects. I'm re-building my workflow and automation rules, and thus far workflow was similar and therefore easy, but I've been going around in circles to sort out my first automation.
In server, it looked like the below where upon a transition, I would set the developer (customer person) field to the user who was the assignee at the time.
So in my cloud instance I've gone and setup a new person field to match, yet when I try to find the rule in the action trigger the field doesn't show. I tried to find solutions for this with no luck, so have tried the coding option (and I'm not a coder)...
I found my custom field id to be cf[10246] so I've tried a few things but this is what it looks like and no surprise it's not working! Maybe I'm not even close, but given my lack of experience I feel like I've had a fair crack.....
Any help would be greatly appreciated, please.
Thanks, Brendan
So through sheer persistence and trial and error I've solved this. Formula that worked is:
{
"update": {
"customfield_10246": [{
"add": {
"id": "{{initiator.accountId}}"
}
}]
}
}
Thank you @Mikael Sandberg for the post here
What a mission for something that took me 1 minute on the server!
Thanks all of you for chipping in. I'm exhausted!
I'm not sure if capital letters make difference but can you try to use {{initiator.accountId}} ?
Also what I see is that after }} there is a dot. Please remove it.
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick reply @Sebastian Krzewiński, it's much appreciated.
I (think I) made those adjustments but it still failed.
Also, the error message isn't helpful, just still advises incorrect JSON.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Brendan Sheppard ,
Just pointing out the obvious here but we never know!
If the JSON is incorrect, could it be because of the comma you have at the end of the 4th line, next to the initiator accound Id variable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Elyes Gannoun [Elements] I can't code so nothing is obvious :D
I removed that but still no luck.
I tried changing the custom field id also to "customfield_10246" as I had seen it displayed like this but that also didn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Brendan Sheppard - I tried something on my end that worked which differs a bit from what you've configured:
For an automation action "Edit issue" in the additional fields section, I've written:
{
"fields": {
"Custom field name": "Custom field value"
}
}
Just try to put the name instead.
What is the custom field 10246 type ? If it's a user type, the object must be different
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.