i am having a custom field of type TextField . so when ever i modify the custom field i have to know the old values as well as new values of the custom field .
kind Regards
Naren
Every issue has a history tab which shows all the changes to all fields of that issue. See http://confluence.atlassian.com/display/JIRA044/Viewing+an+Issue%27s+Change+History
Thanks for the help , But i required as java code like when ever my custom field is updated my boolean value should be equal to true ......plz help me
Regrds
Java code? How are you accessing Jira? REST or SOAP? And I guess in both the issue history is not available.
If your code is in a listener, then the changes are listed in the event that the listener catches. Similarly for a post-function - they're in the muteableissue object.
In the listener, you will get the event and you can get the Changelog from it. From the changelog, you will get the changegroup id and use it to fetch all the relevant changeitems.
GenericValue changelog = event.getChangelog(); Long changeGroupId = changelog.getLong("id") List<GenericValue> changeItems = delegator.findByAnd("ChangeItem",EasyMap.build("group", changeGroupId));
Now, iterate over the changeItems and get oldvalue, oldstring, newvalue and newstring to find the changes! field will get you the fieldname.
Hi Thanks for the code .It works for me in the edit screen when ever i edit my customfield (ex:textcustomfield) first but when i edit my customfield after editing the other custom fields then my change items are different.Below is my description with an example:i have 2 custom field userpicker and textfield case 1: If i edit my text custom field first and userpicker custom field second then i will get changte items for text custom field case 2: If i edit userpicker custom field first and my text custom field second then i will get change items for userpicker custom field so can u plzz give me the code where if i edit my text custom field either first or last , i should get change items for my text custom fieldthanks & regardsNaren
It doesn't matter in which order you edit, you will have a changeItem for each change you make. It seems you are only getting the first changeItem in the list. Get all the changeItems using the groupid, iterate through it and find the one for your custom field. As you can see changeItems is a list!
Hi thank u very much , i was able to get the list of change items .iterated and got the result.Problem resolved .thanks once againregards Naren
It looks like you're new here. Sign in or register to get started.