mantisbt-plugins / source-integration

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitea, Gitweb, Cgit, Subversion, Mercurial and more
http://noswap.com/projects/source-integration/
MIT License
181 stars 130 forks source link

Does not close issues anymore #395

Closed picrap closed 2 years ago

picrap commented 2 years ago

Hi, this is more a rquest for help than an issue. I use MantisBT 2.24.1 with source-integration and gitlab plugins in latest versions. The rules that were working stopped working, I reset them and it is still not working. The rules are:

On a commit with message such as Implemented double password input at account creation (implements #2016), nothing happens except the referencing part (so integration to gitlab is working) but the issue is not closed anymore.

How to diagnose the problem? Is there a log somewhere?

dregad commented 2 years ago

The rules that were working stopped working

To narrow down the problem, did you upgrade mantisbt and/or source plug-in? If so, what were the previous versions?

Is there a log somewhere?

Unfortunately not. This has been on the todo list for ages (see #92), but I never got around to working on it.

picrap commented 2 years ago

I added a module to edit in markdown, but when disabling it, the problem remains. I also noticed today that the latest commits were not shown, I had to force a refresh. Is it possible that a cache or configuration is corrupt? I’ll try to reset all configuration and cache.

dregad commented 2 years ago

@picrap you have not answered my question...

the latest commits were not shown, I had to force a refresh.

Maybe there's a problem with the API key, or with the GitLab webhooks that are triggered when new commits are pushed ?

picrap commented 2 years ago

I checked API key fixed outbond hooks (security has changed in gitlab), but all I get is a comment in my issue saying Fix committed to master branch, and the issue is still open.

dregad commented 2 years ago

For the 3rd time...

To narrow down the problem, did you upgrade mantisbt and/or source plug-in? If so, what were the previous versions?

picrap commented 2 years ago

Sorry for not answering. Mantis wasn’t upgraded and source plugin was upgraded after it stopped working. Unfortunately I haven’t kept previous version, so I can not tell.

dregad commented 2 years ago

@picrap I tested this on my dev box and everything seems to work fine, with the regex and commit message you posted above.

Note that we only resolve the issue if an authorized handler has been identified; otherwise, it will remain open. Reference: https://github.com/mantisbt-plugins/source-integration/blob/v2.5.2/Source/Source.API.php#L298

Can you check the following:

Also make sure that you have checked the Resolve Fixed Issues option in the plugin configuration

If that does not help, then I guess you'll have to do some step-debugging. Assuming the changeset is created properly in your Mantis following the GitLab webhook's execution, and the issue is linked properly (which I think is what you meant by nothing happens except the referencing part (so integration to gitlab is working), you will want to debug function Source_Process_Changesets() in Source.API.php.

picrap commented 2 years ago

The names weren’t matching and it was working, now the names match and it is still broken. I’ll look at the source.