johannesjo / super-productivity

Super Productivity is an advanced todo list app with integrated Timeboxing and time tracking capabilities. It also comes with integrations for Jira, Gitlab, GitHub and Open Project.
http://super-productivity.com
MIT License
11.12k stars 875 forks source link

Gitlab 403 error when selecting an issue which is on todays list #3300

Open tunguskar opened 1 month ago

tunguskar commented 1 month ago

Your Environment

Expected Behavior

When I select an issue (which was put on the todays list from gitlab) I want to see the ticket without an 403 error

Current Behavior

I get this error:

image

Steps to Reproduce (for bugs)

Just select the issue. But this worked already

Can you reproduce this reliably?

yes

Console Output

image

Error Log (Desktop only)

This log is not really about the issue I think, a second step.

image

github-actions[bot] commented 1 month ago

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

github-actions[bot] commented 1 month ago

Hello there tunguskar! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

For more open ended discussions and/or specific questions, please visit the discussions page. 💖

tunguskar commented 1 month ago

I have more information it looks like the link used is incorretct:

image

my project is internal and I have setup the token.

for example this link gives the error 403: (this uses the ID) image

if I use the iid it works

johannesjo commented 1 month ago

Thank you! I'll have a look!

BanditsBacon commented 1 month ago

Yeah after some digging and testing. This what i found and i think it's what @tunguskar wrote.

The URL which throws the 403 error https://gitlab.com/api/v4//issues/{ISSUEID}?page=1&per_page=100

But issues are related to a particular project. And in this Project the Issue has a iid: which is the issues project id.

"id": 111111111,
      "iid": 1,
      "project_id": 1234567,

https://gitlab.com/api/v4//issues/111111111?page=1&per_page=100 The response is 403

With the added Project (where the Issue belongs) and the global ID https://gitlab.com/api/v4/projects/1234567/issues/111111111 The response is 404

The url which works https://gitlab.com/api/v4/projects/1234567/issues/1

And with the Url from @tunguskar should be https://gitlab.com/api/v4/projects/1234567/issues/1/time_stats and not

https://gitlab.com/api/v4/projects/1234567/issues/1111111111/time_stats

johannesjo commented 1 month ago

Great job @BanditsBacon ! Would you maybe like to provide a PR for this! I'd much appreciate it!!

BanditsBacon commented 1 month ago

I'm not that familiar with Typescript but I can have a look at it. I wanted to do it anyway to implement Gitlab issues with Super later on :)

johannesjo commented 1 month ago

That is great to hear! Please let me know if you have any questions!

johannesjo commented 1 month ago

Hey @BanditsBacon how is it going? Can I assist you in some way? :)

BanditsBacon commented 1 month ago

Hey @BanditsBacon how is it going? Can I assist you in some way? :)

Hi @johannesjo sorry The last 2 weeks have been pretty hectic. So I only managed to get a small overview. One question. Is there a reason why the URLs are assembled? For a gitlab issue, an array with links is provided by the API, which also returns the self url.

But yeah I hope next week I have a little bit more time

johannesjo commented 1 month ago

One question. Is there a reason why the URLs are assembled?

I don't really know unfortunately. Most of the changes to the gitlab integration haven't been done by myself :(

BanditsBacon commented 4 weeks ago

Okay. I try to take a look this week. Is there anyway to contact you, like discord, or is this (issue comments) the preferred way?

johannesjo commented 3 weeks ago

Not using discord very much (only when gaming), so email would be ideal for me: contact@super-productivity.com

johannesjo commented 3 weeks ago

Did you send me an email already? haven't found anything in my inbox...

BanditsBacon commented 3 weeks ago

Did you send me an email already? haven't found anything in my inbox...

no sry but now :)