Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not close issues anymore #395

Closed
picrap opened this issue May 27, 2022 · 8 comments
Closed

Does not close issues anymore #395

picrap opened this issue May 27, 2022 · 8 comments

Comments

@picrap
Copy link

picrap commented May 27, 2022

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:

  • Regex for fixed bugs (pass 1): /(?:fixe?d?s?|implement(s|ed)|resolved?s?)+\s*:?\s+(?:#(?:\d+)[,\.\s]*)+/i
  • Regex for fixed bugs (pass 2): /#?(\d+)/

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
Copy link
Member

dregad commented May 27, 2022

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
Copy link
Author

picrap commented May 27, 2022

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
Copy link
Member

dregad commented May 28, 2022

@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
Copy link
Author

picrap commented May 30, 2022

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
Copy link
Member

dregad commented May 30, 2022

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
Copy link
Author

picrap commented May 30, 2022

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
Copy link
Member

dregad commented Jun 13, 2022

@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:

  • does the commit's Author match an existing user in Mantis ?
  • If yes, is that user allowed to handle issues (access level >= handle_bug_threshold)
  • If not, check the same for the Committer

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.

@dregad dregad closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2022
@picrap
Copy link
Author

picrap commented Jul 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants