Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,225
Community Members
 
Community Events
184
Community Groups

Automation for JIRA to clear a field value

Edited

Please help to create an automation that clears a fields value using Automation for JIRA.

4 answers

I found that, if you are doing an automation rule where the trigger is the changing of the value of a field, leaving date fields blank to clear them does not work.

Instead, I have to use {{clear}} trick:

Solved: How to use automation to clear date value on chang... (atlassian.com)

Thanks,
Mike

Hi Mike,  What "{{clear}} trick"?  The given link provides no details.

I need to clear custom date fields "Target start" and "Target end" (created by Advanced Roadmaps), which are not visible in the field dropdown, hence must use the Additional Fields section.

Like Michael Peal likes this

Actually, after some trial and error, this appears to work:

{
    "fields": {
        "Target start": null
    }
}

Like # people like this

This just really helped me! Thank you! I used it to automatically remove a flag when changing the status from blocked to any other status. 

 

{
    "fields": {
        "Flagged": null
    }
}

Like # people like this

Thank you @Michael Spoonauer for the {{clear}} tip. 

I used it on a custom field and it worked:
Clear Field Automation.PNG

Like Eric Bergeron likes this

Thanks for sharing. This solved an issue I had removing the Due Date values.

Thank you @Lily Tucker-Ha who's solution was particularly quick and simple. 

Like Lily Tucker-Ha likes this
1 vote
Johan Soetens _Dumblefy_
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.
Dec 12, 2019

Hi Andrew,

I don't know your full use case but note that there are out-of-the-box Jira workflow post functions that can clear a field.

https://confluence.atlassian.com/adminjiracloud/advanced-workflow-configuration-776636620.html#Advancedworkflowconfiguration-postfunctions

0 votes
Chris Fontana
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.
Dec 13, 2019

Hey Andrew, 

Thanks for reaching us. I'm from Automation for Jira team :)

It seems that you're trying to clean the custom field Baseline end date, right?

So, can you try to remove the additional field configuration?  

 

edit field.png

Then, you'll need to keep this field empty, and with this configuration, your field will be empty.

1c2ee3f7-e622-4369-968f-31c0cfb5c410.pngCan you give a try and let me know how it goes?

Have a nice day!

Cheers, 

Chris

Hi Chris,

I stumbled upon this issue, because I have the same use case:

grafik.png

Unfortunately, the solution you suggest does not work for me:

grafik.pngBut the field is of course available for this issue; the issue got selected only because it has this field set.

Any ideas on how to solve this?

Kind regards
Martin

Turns out: The problem in my case was that the Actor did not have "Edit issue" permission. :)

Now that I've given it this permission, I can confirm that your suggestion works.

Regards
Martin

Like Dave Liao likes this

Is it possible to do this for the Resolution Field? I'm trying to clear it when reopening an issue but all of the suggestions I can find don't appear to work:

Screenshot 2020-11-30 121324.pngScreenshot 2020-11-30 121350.png

This is currently what i have but it does not work.

Hi @Chris Fontana  , 

 

I am facing a strange issue with the automation rule.

When I use the automation for only one custom field , it works all fine.(PFA)

image.pngBut when I use it for multiple custom fields it fails.

Any idea what could be missing here.

 

Thanks,
Ajinkya

Suggest an answer

Log in or Sign up to answer