You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
i am trying to get last updated labels value from script runner using ChangeHistoryItem,
i able to get created time, field name, but can't get from/to values.... objects are null
when i query label collection - it's arranges labels in collection not by adding time, but by name ascending, so stopped on this.
please guide me how to retrieve last added/removed label name
This is quite a hard one to explain, but there is a subtle difference between changing a field value and changing the content of a field value.
Jira stores labels in a list which then becomes the value of the field. The change history records changes to the values of fields, including the to and from. For simple values, this works fine - string "abc" changed to string "cba" or number changed from "42" to "27". The date and time of the change comes from the record that you changed it. Same for lists too - list [a, b, c] changed to list [a, b, c, d] But note that the record is of the change of the list, not a record of what was added or removed from the list.
So, simply put, the data you are trying to find simply isn't there. You've got a record of the change of the list, but not that specific items in it were added or removed.
To establish when a label was added, you will need to
hi, thanks, but issue is that from / to are completely empty. they are not even lists...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
looks like i found way how to get what you were described
i managed to get difference from getChangeHistoryById by changeGroupId
changeHistoryManager.getChangeHistoryById(changeItems.last().changeGroupId).getChangeItems()
now able to see new /old values.
anyway thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.