super-productivity icon indicating copy to clipboard operation
super-productivity copied to clipboard

Gitlab integration issue

Open rcp87 opened this issue 2 years ago • 19 comments

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

rcp87 avatar Jun 10 '22 13:06 rcp87

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] avatar Jun 10 '22 13:06 github-actions[bot]

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

github-actions[bot] avatar Jun 10 '22 13:06 github-actions[bot]

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 avatar Aug 16 '22 21:08 tg-x

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

tg-x avatar Aug 16 '22 21:08 tg-x

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!)

paraflu avatar Sep 15 '22 13:09 paraflu

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

johannesjo avatar Sep 16 '22 12:09 johannesjo

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

paraflu avatar Sep 16 '22 13:09 paraflu

@paraflu use a group with multiple projects

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

f8-ptrk avatar Sep 17 '22 13:09 f8-ptrk

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.

luisovalles avatar Sep 28 '22 16:09 luisovalles

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

paraflu avatar Sep 28 '22 17:09 paraflu

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 ?

fmorillo avatar Dec 16 '22 21:12 fmorillo

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!

NewlineDotBlog avatar Jan 12 '23 15:01 NewlineDotBlog

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

hugaleno avatar Apr 09 '23 04:04 hugaleno

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

github-actions[bot] avatar Aug 12 '23 01:08 github-actions[bot]

It's relevant in my case

NITEMAN avatar Aug 22 '23 10:08 NITEMAN

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

github-actions[bot] avatar Dec 21 '23 01:12 github-actions[bot]