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

Already on GitHub? Sign in to your account

Incorrect users in history when attaching changeset #29

Closed
dregad opened this Issue Sep 10, 2012 · 3 comments

Comments

Projects
None yet
1 participant
Owner

dregad commented Sep 10, 2012

Commits authored by someone without write access to repository and/or without being developer in MantisBT are not registered properly in the MantisBT history, as shown in the issue below

http://www.mantisbt.org/bugs/view.php?id=14700&history=1#history

In this example, the commit was authored by "JGuilbaud" aka LapinKiller in MantisBT, and committed by me.

  • Changeset attach event is logged by non-existent user id '0'
  • Issue fields updates are done by 'anonymous' user
Date Modified    Username       Field                    Change               
====================================================================== 
[...snip...]
2012-09-10 09:29 user0          Changeset attached        => MantisBT
master-1.2.x 7aa07d86
2012-09-10 09:29 anonymous      Status                   assigned => resolved
2012-09-10 09:29 anonymous      Resolution               open => fixed       
2012-09-10 09:29 anonymous      Fixed in Version          => 1.2.x           
======================================================================

I believe the author should be the committer.

Owner

dregad commented Feb 22, 2013

I noticed another problem, which probably has the same root cause. If the commit's author is a valid MantisBT user (identified by matching commit's e-mail address or username with DB), then the issue is updated with the author's id, even if they do not have the right access level to perform the action (e.g. a reporter becomes the issue's handler).

Example: http://www.mantisbt.org/bugs/view.php?id=15522&history=1#history

Date Modified       Username       Field                 Change
2013-02-21 11:52    marco.dings    Changeset attached    => MantisBT master-1.2.x 9b8beb72
2013-02-21 11:52    marco.dings    Assigned To           => marco.dings
2013-02-21 11:52    marco.dings    Status                new => resolved
2013-02-21 11:52    marco.dings    Resolution            open => fixed
2013-02-21 11:52    marco.dings    Fixed in Version      => 1.2.x
2013-02-21 11:52    marco.dings    Changeset attached    => MantisBT master b41b5281
Owner

dregad commented Feb 22, 2013

Actually, the problem is slightly worse than just that the wrong field being used to perform MantisBT actions - the plugin saves incorrect changeset information to the database:

  • In MantisBT repository, changeset details indicate that the author and the committer are the same person (marco.dings).
  • However in the original commit 9b8beb720c86c0aef450dc7467795e2d7d2428a3, the author is marco.dings and the committer is dregad

Therefore the data in the plugin's tables does not reflect the reality.

Owner

dregad commented Feb 22, 2013

Fixed in 602cc40

@dregad dregad closed this Feb 22, 2013

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