The startedAfter parametsrs not working on getWorklog method
usmanzia7864561 opened this issue · 5 comments
I want to access a specific time period workLog on the issue but he always return all the worklog,Someone help me to sort this issue.
I have attached the code below
try {
$issueService = $this->initializeJira();
$IssueSearchResult = $issueService->search($jql);
foreach ($IssueSearchResult->getIssues() as $issue) {
$timestemp = Carbon::parse($from)->timestamp;
$pwl = $issueService->getWorklog($issue->key, ["startedAfter" => $timestemp]);
$worklogs = $pwl->getWorklogs();
}
} catch (Exception $e) {
}
hi, @usmanzia7864561 I'm sorry for the late reply.
could you share your JQL with me, please?
@lesstif Here is the Jql query
$jql = 'worklogAuthor = "' . $username . '" AND worklogDate >= ' . $from . ' AND worklogDate <= ' . $to . ' AND timespent > 0';
Hi @usmanzia7864561. I'm so sorry.
I can't find the solution for this. I tried several types as parameters, for example, UNIX timestamp or other Time formats, but I always failed.
It is presumed that on-premises does not support search parameters.
good luck!
I wish you a good day.
@usmanzia7864561 tell me, please, how did you get around the problem?
I tried with such a request body, but it doesn't work:
{"startedAfter":1670533200000,"startedBefore":1670619599000}
Доброго дня.
@usmanzia7864561 подскажите, пожалуйста, как получилось обойти проблему?
Я пробовал с таким телом запроса, но тоже не работает:
{"startedAfter":1670533200000,"startedBefore":1670619599000}
Thank you in advance.
@Eufes Eufes I I am using a different library to get the Jira workLog. This is the link https://worklogpro.docs.apiary.io/#reference/0/worklogs/get-worklogs-for-a-user.