Delete a customField from an issue

Deleted user June 2, 2017

Hi everybody,

I would like to delete a customfield of my issue with a groovy script only on a particular case (if my employee is in the category "permanent employee", i wish delete the customfield "contract end date" of my issue). Is it something possible ?

Otherwise I should clear my field.

4 answers

1 accepted

1 vote
Answer accepted
Aleksandr Zuevich
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.
June 6, 2017

Hi,
you can do 

yourCustomField.setHidden(true)
0 votes
Deleted user June 6, 2017

Thanks for your answer guys, the best way to do what i wanted to do is to hide the field like Aleksander said. :)

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.
June 2, 2017

I assume you don't really mean "delete", but just "blank out or empty the date of a field"?

A scripted listener is the best way to do that, it can listen for issue changes, check if your employee field has changed, check the new employee's category and set the customfield value to "null" if appropriate.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2017

Fields are either displayed or not displayed based on issue type or project. You can't delete it on a case by case basis. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events