Hi everyone,
I'm trying to automate reassigning an issue in Jira as it moves through a couple levels of code review. When the issue moves from "To Do" to "In Progress", I'd like to automatically record the Assignee in a custom Author field.*
I've added Author, a custom person field, to the issue's template, but it's not appearing in the "Automation / Edit issue / Choose fields to set" dropdown. So I've been trying the advanced fields approach based on https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
Currently I get the error "COM-48 (data was not an array (customfield_10051))" using this:
{"fields": {"Author": {"id": "{{assignee.accountId}}"}}}or this:
{"fields": {"author": {{ assignee.accountId.asJsonObject("id")}}}}The error occurs regardless of whether or not I restrict Author to a single person.
What should I be doing differently?
*Background:
An issue will progresses through two levels of review. When it goes to level 1 review, I'd like the assignee to become the level 1 reviewer. If the level 1 reviewer sends it back to the author for review resolutions, the assignee should become the author. When the level 1 reviewer sends it to level 2 review, the assignee will be the level 2 reviewer. It's possible for the level 2 reviewer to send it back to the author for additional work, which is why I can't use "assign to previous": that would take it back to the level 1 reviewer, not the author. Hence the need for an author field to make sure the assignee can reliably go back to the author.