Hello, My query is not considering the last update date of an issue. Where am I going wrong ? Please read below for my code :
def get_first_last_date(year, month):
_, num_days = calendar.monthrange(year, month)
first_date = datetime.date(year, month, 1)
last_date = datetime.date(year, month, num_days)
start_date, end_date = first_date.strftime("%Y-%m-%d"), last_date.strftime("%Y-%m-%d")
return start_date, end_date
def func2(year, month):
start_date, end_date = get_first_last_date(year, month)
print(start_date, end_date)
issues = jira.search_issues(jql_str=f'project = pat and status = Done and type != Bug and '
f'updated >= {start_date} and updated <= {end_date} ORDER BY updated DESC',
fields="key, reporter, assignee, customfield_10400, customfield_15041"
)
for issue in issues:
print(f"Key: {issue.key}")
print(f"Reporter: {issue.fields.reporter}")
print(f"Developer/ Assignee is {issue.fields.assignee}")
print(f"QA: {issue.fields.customfield_10400}")
print(f"Team Lead: {issue.fields.customfield_15041}")
print(issue.fields.updated)
print("\n\n")
# get jiras which were updated in the month of September 2024
func2(year=2024, month=9)
start_date, end_date = 2024-09-01, 2024-09-30 # in this case
Example of issue
issue.fields.updated -
2024-09-30T17:51:03.458-0400