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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to detect FixVersion changes

Hi all,

How can I check if a fixVersions value was changed or removed. ie. My fixVersions is "v1.0" and the user  removed. I'm use scriptrunner for JIRA ny Adaptavist.

I tried that like below but i saw same value.

def originalIssue = issueManager.getIssueObject(issue.id)

if(issue.fixVersions[0]?.name != orginalIssue.fixVersions[0]?.name){

// My expected is issue.fixVersions[0]?.name value be empty and originalIssue.fixVersions[0]?.name value be old value

}

 

3 answers

0 votes
EzraARA Atlassian Team May 31, 2018

 

Good day, Ahmet!

I am not quite sure if you are doing this for reporting purposes (and you want to run it manually) or automation purposes, but I just want to share that our JQL has an operator to check if Fix Version was changed:

- Advanced searching - operators reference - Atlassian Documentation - CHANGED

 This operator can be used with the Fix Version field, and  is used to find issues that have a value that had changed for the specified field.

Hopefully this could be of some help for you :)

Cheers,
Ezra ARA | Atlassian Cloud

This was helpful.

@EzraARA : Hi Ezra, what about affected Version for JIRA Server 8.3 and higher ?

I am trying to do the same as suggested by you for fixversion but I am not seeing any data. JQL below

 

fixVersion changed FROM "Version1" TO "Version2" order by created DESC

 

We are on Jira Cloud 

Hello,

Is a post function or validator? If it is a post function, then it must be first in the list of post functions

is it like this? it does not work.

def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()

def changeItems = changeHistoryManager.getChangeHistories(issue)

if (changeItems) {
  def changeItem = changeItems.last().getIssue().fixVersions[0]?.name

What does not work? Do you want to get a value from the history? Try to log the changeItems and see what is in the varaible

log.error("change items: " + changeItems.toString())

You can see the output in the atlassian-jira.log file

@EzraARA : I am trying to do the same as suggested by you for fixversion but I am not seeing any data. JQL below

 

fixVersion changed FROM "Version1" TO "Version2" order by created DESC

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you