WorklogPRO returns 404 when requesting worklog

David Brinkmann April 3, 2024

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

 

1 answer

0 votes
Deniz Oğuz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

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?

David Brinkmann April 3, 2024

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

Deniz Oğuz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

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

David Brinkmann April 3, 2024

2024-04-03 14_43_12-Gather Border Highlight.png

This is my project permission for worklogs. I only find 

  • view own worklogs
  • view worklogs of private issues
  • view all worklogs

 

The one that isn't there:

  • view worklogs

 

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.

Deniz Oğuz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

Can you enable logging for WorklogPRO? and check the log for a message like the following:

 

Handled {} as special case and result was {}
Christiane Wolff
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2024

Hi Deniz,

I'm working on the same plugin together with David, here's the log excerpt you requested:

2024-04-03_worklogPro_log.png

Thank you for your help

Christiane

Deniz Oğuz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

Everything seems to be normal. That is really interesting. Can you open a ticket in our SD? We can debug this together. 

David Brinkmann April 4, 2024

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!  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events