How to clear or empty the Resolution field using JSON

Chris Robbins
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 2, 2022

Hi there,

Using automation, I need to set the Resolution field back to Unresolved.  The problem is that 'Unresolved' is not listed in the drop-down when trying to do it through the Edit Issue selection.  So I have to use JSON.  I've tried a few different things and nothing has worked so far.  This is what I've tried so far:

{
"fields": {
"resolution": { "id": null }
}
}

{
"fields": {
"resolution": null
}
}

{
"fields": {
"resolution": ["Unresolved"]
}
}

4 answers

2 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

Hi @Chris Robbins , welcome on the community. I'd suggest you to use the workflow's postfunction to set or clear the resolution (as @Alex Koxaras _Relational_ suggests), but if your use case requires to use the Automation, you need to do it using following setup. Let me know if you need more help :)

Screen Shot 2022-09-02 at 10.57.21.png

Luis Felipe Studzinski Santos March 9, 2023

It helped a lot. Thanks

Marc Isikoff
Contributor
June 23, 2023

Does not work:

 

(Could not find valid 'id' or 'name' in resolution object. (resolution))

 

Now the post function is not an option if we have no access to edit it (by rule of company)

Like Dominique Wille likes this
Suresh May 24, 2024

I have a similar situation. Linked issue inherits Status & Resolution from Linked Story 

Capture.PNG

and it is fails with error
Capture.PNG

Our workflow does have 

Clear Resolution post-functions on Open and In Progress . And Resolution field screen on Closed Transition with a Validator of Resolution field being required.

Any suggestions?

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2024

Get rid of the validator on the close transition, you do not need it.

Then reverse the two actions for "edit" and "transition" - you need to set the resolution before you transistion.

Like Suresh likes this
Suresh May 27, 2024

@Nic Brough -Adaptavist- You are the best. I retained validator to skip it for Test Issue type and your solution of swapping edit and transition worked. Resolution has to be before Transition. 

Like Nic Brough -Adaptavist- likes this
Daniel Sanchez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2024

Hi Suresh, Does it work for you changing resolution to null? I have tried similar solution as exposed but always having same result: 

Error editing issues
(Could not find valid 'id' or 'name' in resolution object. (resolution))

Transitioned issues to Open

0 votes
Volker Lenz October 31, 2023

Clearing the resolution field is indeed a puzzling topic in Jira:

When I create automations which are triggered manually on a preselected issue, I found that this JSON snippet in the action "Edit Issue" works fine:

{
"fields": {
"Resolution": null
}
}

On the other hand, when I create scheduled automations, which run on a JQL-filtered set of issues, that very same approach to clear the resolution field does not work and thows error messages as follows:

"enter Resolution (id or name) in text sting format (resolution)"

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2022

This can't work because the REST API, and Automation works the same way that the UI does.

If you put the resolution on an edit screen, you don't get an "unresolved" or "none" option, and the system will default it to a value, so you have no option but to set it to something.

You can't blank out a resolution by editing an issue.  You have to do it by transitioning an issue to an open status and using a post-function to clear the resolution, exactly as @Martin Bayer _MoroSystems_ s_r_o__ says.

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

Hi @Chris Robbins and welcome to the community,

I would expect that ""resolution": null" would work. What response are you getting?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022
Brandon Valley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 4, 2023

 

Could you please show an example of how to do this using a Jira automation? - Thanks!

Suggest an answer

Log in or Sign up to answer