jira-tools icon indicating copy to clipboard operation
jira-tools copied to clipboard

Time report return "no issues with worklogs available"

Open remyneron opened this issue 4 years ago • 6 comments

If i try create time report from 2020-01-01 to 2020-01-31 jira aid return:

"Apparently there are no issues with worklogs available for [username] in the requested time period."

But if i create report from 2020-01-01 to 2020-03-31 jira aid return all correct include issues from 2020-01-01 to 2020-01-31.

I found this issue: https://github.com/ljay79/jira-tools/issues/204, with the same problem. In comment was query "worklogDate>="2020-01-01" AND worklogDate<="2020-01-23" <...>", it works fine.

With what the problem may be related?

remyneron avatar Oct 27 '20 10:10 remyneron

Hi @remyneron thx for using my add-on, sorry to hear you have trouble.

As you refer already to issue #204 ; did you maybe already tried the explained JQL Advanced Search directly in Jira as described in #204 ? For further assistance from my end, i would need some debug logs for this case. Please activate Debugging in "About" dialog, provide me with your "Temp. User Key" and then perform at least one another "troubling" try. This way it will log the error and debug information to project owners StackDriver logging account where we can analyze it better.

Note: User credentials are not transmitted in any log data.

ljay79 avatar Oct 27 '20 13:10 ljay79

Hi @ljay79 Thx for the helpful tool and quick help.

Yes, I used the query from # 204, it returns the full list of tickets for the period, everything is fine.

Enabled debugging, here's a temporary key: "ALEt7zSw5AcrwlRoFPjteJbJap+NqquF1DS+94kkwsZr3xhhHbpSLHsGZLMttgNLpspUel/AfhHy".

Made several attempts to create a report (all for the same user), the result was different:

  1. 05:15 UTC got an error when requesting the period from 2020-01-01 to 2020-01-31.
  2. 05:16 UTC got an error when requesting the period from 2020-01-01 to 2020-03-31. (worked yesterday)
  3. 05:20 UTC has successfully generated a report for the period 2020-01-01 to 2020-01-31.
  4. 05:25 UTC has successfully generated a report for the period 2020-01-01 to 2020-03-31. (although the parser hangs when creating a report)
  5. 05:51 UTC got an error when requesting the period from 2020-01-01 to 2020-01-31.
  6. 05:52 UTC got an error requesting the period from 2020-01-01 to 2020-03-31.
  7. 05:53 UTC got an error requesting the period from 2020-01-01 to 2020-01-31.
  8. 05:54 UTC has successfully generated a report for the period 2020-01-01 to 2020-03-31.
  9. 05:55 UTC got an error when requesting the period from 2020-01-01 to 2020-01-31.
  10. 05:57 UTC got an error when requesting the period from 2020-01-01 to 2020-03-31.

What else can i do to localize the problem?

remyneron avatar Oct 28 '20 06:10 remyneron

Thank you for the great details of the test cases. I could trace it down to some issue when search the old fashioned way with usernames in the older Jira API vs. the new versioned API search where Jira accepts only internal users account IDs to search for.

I have an assumtion how this raises issues but not always: I assume, the problem occurs always, when you create a report and manually enter (or copy&paste) the users name into the search field without selecting him from the autocomplete dropdown.

Could you try to reproduce 2 versions: a) Create time report and enter the username/name manually (or copy&paste) then hit "Create Report"

b) Select a user from the autocomplete suggestions and then hit "Create Report"

If my suspicion is right, option b) should give you always results and option a) never or only sometimes.

ljay79 avatar Oct 30 '20 15:10 ljay79

Thanks! Looks like your assumption is correct, the problem is in the control of username input.

Test results:

  1. If type the user's ID manually, for example: "remyneron", and not use autocomplete (just type id - "remyneron", and all) then the report is always created;
  2. If start typing the name or user's ID, for example: "Remy ...", and select "Remy Neron (remyneron)" in dropdown with the keyboard and press enter, then the report always returns an error for the requested user;
  3. If start typing the user's ID, for example: "Remy ...", and select "Remy Neron (remyneron)" in dropdown with the mouse, then the report is always created.

Thus, the problem occurs if you start typing the username and then select in dropdown list with the keyboard. Perhaps there is also a peculiarity in the fact that I began to enter the name in my native Russian, i.e. did not enter the user ID, but his full name like "Борис" and with keyboard choose "Борис Юринов (TheBlade)".

Now I know how to choose a username for the correct creation of reports. Thank you, this is enough for me, the ticket can be closed.

remyneron avatar Oct 31 '20 15:10 remyneron

Glad we have a workaround found, but I will check and fix this soon anyway.

ljay79 avatar Oct 31 '20 21:10 ljay79

keeping it open for later bug-fixing

ljay79 avatar Nov 11 '20 08:11 ljay79