How to clear FixVersion field through scriptrunner listener ?

Gandhari Soumya July 23, 2019

I need to clear the FixVersion field in certain conditions.

 

Am using custom script listener through scriptrunner

 

However am unable to clear it. I have tried out below two options.

  • issue.fixVersions.clear();
  • issue.fixVersions.removeAll();

Neither of the above options worked.

No exceptions or failures either.

2 answers

0 votes
Mohamed Adel
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.
October 10, 2021

Hi @Gandhari Soumya 

 

Might be it is old but for recording , you will need to have an empty version object

def version = ComponentAccessor.getVersionManager().getVersionsByName('')
issue.setFixVersions(version)
ComponentAccessor.issueManager.updateIssue(applicationUser, issue, EventDispatchOption.ISSUE_UPDATED, false)

 

Regards,

Mohamed Adel

0 votes
Andrew Merry July 23, 2019

There are a lot of ways to fix the error,  but if you discuss with snapchat australiayou will get the easiest way to get it fixed. 

Gandhari Soumya July 29, 2019

@Andrew Merry  As informed there are no errors.

And I didn't understand what Snapchat has got to do with my Jira.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events