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.73k stars 909 forks source link

Gitlab integration issue #2115

Open rcp87 opened 2 years ago

rcp87 commented 2 years ago

Hi, First of all congratulations for this great software. I have a problem with integration with Gitlab. Fetching issues is working, but there is a problem with issue data from Gitlab not recovering it. As you can see data not recovering for Gitlab section in the issue, and an error appears below: 404 Project not found. But issues are being imported, so I don't know what is the problem. If you could fix this it would be great. Thanks again for this great application.

image

github-actions[bot] commented 2 years 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 2 years ago

Hello there rcp87! 👋

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. 💖

tg-x commented 2 years ago

ran into the same problem, the issue ID is stored incorrectly, you can see this by right-clicking the issue then open in gitlab. instead of issues/1 it tries to open something like issues/111648708 which could possibly be a timestamp instead of the issue ID

tg-x commented 2 years ago

another problem is that after import an #undefined tag gets added to each issue

paraflu commented 2 years ago

I've made some hack to the service and mapping.

https://github.com/paraflu/super-productivity/commit/c345d9df3871968509c1c6c8247a2fe2cee22cc8

But I don't really understand this commend https://github.com/johannesjo/super-productivity/blob/bec40c57e5b8e96b68d6eaf5c2f50cd791d8af28/src/app/features/issue/providers/gitlab/gitlab-issue/gitlab-issue-map.util.ts#L36 but reverting to issue.id it work (on my local gitlab instance!)

johannesjo commented 2 years ago

Thanks @paraflu ! This is something @cbergmann added to allow for issues from multiple projects. Maybe we need some special handling for either case?

paraflu commented 2 years ago

Well I don't know how try "issue from multiple projects" :S

f8-ptrk commented 2 years ago

@paraflu use a group with multiple projects

but the imported issue is ID is just wrong, causing this issue

luisovalles commented 2 years ago

Thanks for such good software. I am trying to integrate with gitlab and it imports the issues to the backlog perfectly. but there are some vital functionalities don't seem to be working.

I have the same problems commented by other users.

When opening the issues in the browser the URL seems to be wrong. https://gitlab.com/57738621/issues/115892466

This would be the correct one in my opinion. https://gitlab.com/[group]/[task-name]/-/issues/1

It also loads the undefined tag for all tasks.

Screen Shot 2022-09-28 at 12 45 04 PM

Additionally there is a task editing function that is in the right panel. which seems not to work. I don't know what it is but if it managed to edit the gitlab task it would be a success.

paraflu commented 2 years ago

I've solved the problem settings superprod with the name of the project instead of the project id.

The undefined tag and access to issue detail are solved here https://github.com/johannesjo/super-productivity/pull/2243

fmorillo commented 1 year ago

Oh, I was wondering why the gitlab integration is broken in the latest branch. The issue.references.full from: https://github.com/johannesjo/super-productivity/blob/44c01891c04907de397e801c03c768ed3ad25be1/src/app/features/issue/providers/gitlab/gitlab-issue/gitlab-issue-map.util.ts#L36 contains not just the iid but also the project name. That is necessary, because every project with issues has an issue number one. Additionally, if someone already uses the gitlab integration, his or her issues in the backlog will get duplicated (because the ids changed). So it would be great, to revert that change @johannesjo .

If the synchronisation works but not the issue link, the problem will probably be here: https://github.com/johannesjo/super-productivity/blob/44c01891c04907de397e801c03c768ed3ad25be1/src/app/features/issue/providers/gitlab/gitlab-api/gitlab-api.service.ts#L370 But that code looks "fine", maybe it just works for my configuration? My project URL is https://gitlab.my.domain/group/project and in the integration menu I entered "group/project" for the project and "https://gitlab.my.domain" for the gitlab URL. Maybe someone with that problem can provide more details @paraflu @tg-x @rcp87 ?

NewlineDotBlog commented 1 year ago

For everyone like me still struggling with this issue, there is a workaround that seems to work (at least for me):

First, make sure 'Show issues from git as suggestions when adding tasks' is enabled in the Gitlab sync configuration.

Then, instead of using the backlog in the sync'd project to add issues from, use the add task feature (Shift + A) when the project is open. Here you should be able to search for and add your issue.

If you add issues this way, the taks in SP should be properly linked to the issue in Gitlab. Hope this helps!

hugaleno commented 1 year ago

The error 404 ocurred when trying to fetch issue comments when using group source configuration.

The link it tries to access contain the group path name but it doesn't include the name of the project.

The issue itself have a link to his comments, so I changed the code to use that link instead.

Will do some more tests and submit a pull request if everything is ok

github-actions[bot] commented 1 year ago

This issue has not received any updates in 90 days. Please comment, if this still relevant!

NITEMAN commented 1 year ago

It's relevant in my case

github-actions[bot] commented 10 months ago

This issue has not received any updates in 90 days. Please comment, if this still relevant!

tomduese commented 5 months ago

This issue is still relevant for me. I am observing the exact behaviour and wonder, if you still have this on the radar?

johannesjo commented 5 months ago

I am not using the gitlab integration myself. So it would be much better, if someone would pick this up, who uses it on a regular basis.

NITEMAN commented 5 months ago

So it should be re-opened @johannesjo ?

johannesjo commented 3 months ago

Thanks to @hosseinkhaledi there now is a PR to fix this (Thank you very much)! Can somebody maybe help testing this to avoid issues with other gitlab configs?