How to clear or empty the Resolution field using JSON

Chris Robbins 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 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
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-
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

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 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