how can we know whether duedate is changed or not for the ticket or issue ?? in python.

lavanya October 3, 2019
if issue.fields.duedate is not None:
changelog = issue.changelog
for history in changelog.histories:
for item in history.items:
if item.field == 'duedate':
print('Date:' + history.created)

example: when issue was created, duedate is '12-09-2019' but someone or the other changed to '18-09-2019'
how to know whether duedate has changed from original duedate or not??

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 6, 2019

Hi @lavanya 

I do not python but below code might help you.

changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
duedateChanges = changeHistoryManager
.getChangeItemsForField(issue, "duedate")

You can get dueDate field changes and check whether there is at least one change.

I hope I was helpful

Tuncay Senturk

Suggest an answer

Log in or Sign up to answer