Hi Guys,
I want to get details logged by user on daily basis and details should be of last nine weeks.
Could you please suggest and check my code that I am going in right direction or not.
example :-
Key worklogtime logged_date logged_by
203 2h 2018-04-08 xyz
203 1h 2018-04-07 abc
201 4h 2018-04-07 blaah
Piece of Code:-
import jira.client
from jira.client import JIRA
options = {'server': 'https:/example.com', 'verify':False}
jira = JIRA(options, basic_auth=('user', 'password))
issues_in_project = jira.search_issues('project=11372 and Assignee in(xyz,abc)',maxResults=1000)
for value in issues_in_project:
try:
worklogs = jira.worklogs(value.key)
print worklogs.timespent,worklogs.update, worklogs.updateAuthor, worklogs.updated
except:
print("no worklogs")
Got this error :-
Traceback (most recent call last):
File "jira_test_Time_log.py", line 88, in <module>
print worklogs.timespent,worklogs.author,worklogs.updated
AttributeError: 'list' object has no attribute 'timespent'
Exception Exception: Exception('Exception caught in workbook destructor. Explicit close() may be required for workbook.',) in <bound method Workbook.__del__ of <xlsxwriter.workbook.Workbook object at 0x2bbafd0>> ignored