Flying-Free/pyopenproject

TimeEntryServiceImpl find_between_days not working

hawking-lab opened this issue · 1 comments

1: test code

    def workPackage(self):
        today = datetime.today()
        end_date = today.strftime("%Y-%m-%d")
        start_date = datetime.today() + relativedelta(days=-1)
        start_date = start_date.strftime("%Y-%m-%d")
        time_entries = self.tEntryReq.find_between_days(start_date, end_date)

2: the result is full spent time

{'ID': 43, 'spentOn': '2021-03-25', 'created': '2021-03-25T12:27:40Z', 'updated': '2021-03-25T12:27:40Z'}
{'ID': 42, 'spentOn': '2021-03-25', 'created': '2021-03-25T10:15:30Z', 'updated': '2021-03-25T10:15:30Z'}
{'ID': 41, 'spentOn': '2021-03-25', 'created': '2021-03-25T10:14:58Z', 'updated': '2021-03-25T10:14:58Z'}
{'ID': 40, 'spentOn': '2021-03-23', 'created': '2021-03-23T11:55:15Z', 'updated': '2021-03-23T11:55:15Z'}
{'ID': 39, 'spentOn': '2021-03-23', 'created': '2021-03-23T11:51:30Z', 'updated': '2021-03-23T11:51:30Z'}
{'ID': 38, 'spentOn': '2021-03-19', 'created': '2021-03-19T09:55:43Z', 'updated': '2021-03-19T09:55:43Z'}
{'ID': 37, 'spentOn': '2021-03-18', 'created': '2021-03-18T11:37:09Z', 'updated': '2021-03-18T11:37:09Z'}
{'ID': 36, 'spentOn': '2021-03-17', 'created': '2021-03-17T10:16:43Z', 'updated': '2021-03-17T10:17:05Z'}
{'ID': 35, 'spentOn': '2021-03-17', 'created': '2021-03-17T10:04:44Z', 'updated': '2021-03-17T10:04:44Z'}
{'ID': 29, 'spentOn': '2021-03-16', 'created': '2021-03-16T07:43:59Z', 'updated': '2021-03-16T07:43:59Z'}
{'ID': 28, 'spentOn': '2021-03-15', 'created': '2021-03-15T09:19:53Z', 'updated': '2021-03-15T09:19:53Z'}
{'ID': 27, 'spentOn': '2021-03-12', 'created': '2021-03-12T09:23:44Z', 'updated': '2021-03-12T09:23:44Z'}
{'ID': 26, 'spentOn': '2021-03-12', 'created': '2021-03-12T07:58:31Z', 'updated': '2021-03-12T07:58:31Z'}
{'ID': 25, 'spentOn': '2021-03-11', 'created': '2021-03-11T08:58:40Z', 'updated': '2021-03-11T08:58:40Z'}
{'ID': 24, 'spentOn': '2021-03-11', 'created': '2021-03-11T04:24:46Z', 'updated': '2021-03-11T04:24:46Z'}
{'ID': 23, 'spentOn': '2021-03-10', 'created': '2021-03-10T11:50:04Z', 'updated': '2021-03-10T11:50:04Z'}
{'ID': 22, 'spentOn': '2021-03-10', 'created': '2021-03-10T11:48:52Z', 'updated': '2021-03-10T11:48:52Z'}
{'ID': 21, 'spentOn': '2021-03-10', 'created': '2021-03-10T10:12:00Z', 'updated': '2021-03-10T10:12:00Z'}
{'ID': 20, 'spentOn': '2021-03-10', 'created': '2021-03-10T10:11:21Z', 'updated': '2021-03-10T10:11:21Z'}
{'ID': 19, 'spentOn': '2021-03-10', 'created': '2021-03-10T10:09:44Z', 'updated': '2021-03-10T10:09:44Z'}
{'ID': 18, 'spentOn': '2021-03-10', 'created': '2021-03-10T05:53:47Z', 'updated': '2021-03-10T05:53:47Z'}
{'ID': 17, 'spentOn': '2021-03-09', 'created': '2021-03-09T10:28:48Z', 'updated': '2021-03-09T10:28:48Z'}
{'ID': 16, 'spentOn': '2021-03-07', 'created': '2021-03-08T01:56:40Z', 'updated': '2021-03-08T01:56:40Z'}
{'ID': 15, 'spentOn': '2021-02-23', 'created': '2021-02-23T07:47:53Z', 'updated': '2021-02-23T07:47:53Z'}
{'ID': 14, 'spentOn': '2021-02-03', 'created': '2021-02-03T12:27:22Z', 'updated': '2021-02-03T12:27:22Z'}
{'ID': 13, 'spentOn': '2021-02-03', 'created': '2021-02-03T12:26:24Z', 'updated': '2021-02-03T12:26:24Z'}
{'ID': 12, 'spentOn': '2021-02-02', 'created': '2021-02-02T06:11:59Z', 'updated': '2021-02-02T06:11:59Z'}

Process finished with exit code 0

Hi, @hawking-lab !

We have fixed the issue and a new version is available:

pip install pyopenproject==0.7.4

Thanks for your feedback and have a nice day! 😄