Hey there,
I am working on a plugin for my company and we want to utilize WorklogPRO
When calling
/rest/com.deniz.jira.worklog/1.0/worklog/<VALID WORKLOG ID>
from our plugin (either via aapache HttpClient or OkHttp) we get a 404, but the exact same request returns perfectly when used in a browser, postman or IntelliJ HttpClient.
Additionally, when calling another endpoint of WorklogPRO
/rest/com.deniz.jira.worklog/1.0/attr/
just a few lines before it returns with a 200 and a response body as expected.
It also makes no difference if I use a local environment or the test stage. Does anyone has a suggestion on what the issue might be?
Jira Version: 9.12.5
WorklogPRO: 4.18.4
Thanks in advance,
David
Hi,
WorklogPRO returns 404 if the current user doesn't have permission to view worklog or worklog doesn't exist. Are you sure you are using the same user in your integration?
Thanks for the quick reply.
When trying locally I use the default admin/admin user which should have the permission. That's the same user that can get a response via the browser. Furthermore, the attribute endpoint works perfectly. It is only the /worklog endpoint that returns 404
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even if the user is admin, they may not have permission to view worklog. Please check the following permissions:
- view own worklogs
- view worklogs of private issues
- view all worklogs
- view worklogs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is my project permission for worklogs. I only find
The one that isn't there:
Only "view worklogs of private issues" was not set to "Any logged in user". I changed it but it made no difference. Even after adding Administrator Project role to it the behaviour stays the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you enable logging for WorklogPRO? and check the log for a message like the following:
Handled {} as special case and result was {}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deniz,
I'm working on the same plugin together with David, here's the log excerpt you requested:
Thank you for your help
Christiane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Everything seems to be normal. That is really interesting. Can you open a ticket in our SD? We can debug this together.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deniz,
we found the issue and it had nothing to do with WorklogPro but with some concurrency where the the worklog was not yet written but we tried to fetch it.
Nevertheless, thank you very much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.