View Issue Details

IDProjectCategoryView StatusLast Update
0007260mantisbtplug-inspublic2013-06-06 05:35
Reportercas Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0007260: Moving multiple issues from an obsolete user to an existing user
Description

In case you want to delete a user, Mantis shows odd behavior when issues are updated in case they are related to this particular user.
Untill now i did not find a proper solution so created 2 scripts which allow me to move all reference from one user to another throughout the mantis environment.
Includes support for FAQ and Timetracking add-ons.

Additional Information

The process for removing a user would be:

  1. Disable the user
  2. use this script to convert all references
  3. Delete the user
Tagspatch, plugin

Relationships

related to 0010141 feedback Disabled users are no more liste in filter 
related to 0003116 acknowledged If a user reports a bug, and gets purged for inactivity, updating the bug changes the username 

Activities

2006-07-06 05:23

 

syncusers.zip (3,389 bytes)
vboctor

vboctor

2006-07-29 02:04

manager   ~0013165

Thanks for the script. In my opinion the proper solution is for Mantis to populate the list of users in update as follows:

  • Populate all active users that match the required criteria (basically what we have now).

  • Add the current user to the list in case it's disabled. This makes sure that the current behaviour where the first user in the list is selected because the current user is not available in the combobox.

If you provide a patch for this, I can integrate it into Mantis 1.1.

cas

cas

2006-07-30 06:32

reporter   ~0013169

Would the following be a proper alternative :

  1. Delete user
  2. Mantis checks for references to this user
    2a1. If not found, simply delete
    2b1. If found, Mantis asks for replacement user`
    2b2. Replacement user could be defaulted through variable in config_inc
    2b3. If no replacement, No delete, just disable
    2b4. If proper replacement, delete user

2006-10-20 09:56

 

syncusers modified.zip (4,215 bytes)
emathieu

emathieu

2006-10-20 09:58

reporter   ~0013630

I slightly modified cas job to replace entries for user id with drop down lists.
I also provide a patch for adding a submenu for [manage users] menu.
Refer to syncuser modified.zip

cas

cas

2009-03-24 05:26

reporter   ~0021176

Will transfer this one into a plugin for 1.2.0

2009-03-25 04:14

 

Syncuser95.zip (5,897 bytes)
cas

cas

2009-03-25 04:14

reporter   ~0021185

Attached a plugin to be used as of version 1.2.0

alitvak

alitvak

2010-04-22 12:45

reporter   ~0025204

I installed plugin but it doesn't work. When I converge from one user to another I get this message

Database query failed. Error received from database was 0001146: Table 'bugtracker.mantis_project_category_table' doesn't exist for the query: update mantis_project_category_table set user_id=2 where user_id=304.

cas

cas

2010-04-24 02:21

reporter   ~0025240

I will review this plugin over the next few days and provide fix.

cas

cas

2010-04-26 02:29

reporter  

Syncuser.96.zip (5,836 bytes)
cas

cas

2010-04-26 02:29

reporter   ~0025256

Please verify if all fixed in version 0.96

matthew.bowman

matthew.bowman

2010-11-30 11:22

reporter   ~0027517

Last edited: 2010-11-30 11:42

View 9 revisions

would this work for two user accounts, both with data/issues? ie merge one to another, preserve the others data?

I tried and recieved..

Database query failed. Error received from database was 0001062: Duplicate entry '6-2079' for key 1 for the query: update mantis_project_user_list_table set user_id=2079 where user_id=111

matthew.bowman

matthew.bowman

2010-11-30 12:29

reporter   ~0027518

seems I had to remove the sync from user from the project, or else they would conflict after the sync.

cas

cas

2010-12-01 02:50

reporter   ~0027521

Last edited: 2010-12-01 03:01

View 2 revisions

@Matthew,
this indeed is a bug. Fixed this in version 0.98.
In principle there is no reason to remove the user. The project_user_list table should only be reviewed by project where it now was updating in one go. This however can lead to upsetting the primary index.

cas

cas

2010-12-01 03:00

reporter  

Syncuser098.zip (5,991 bytes)
cas

cas

2010-12-01 03:01

reporter   ~0027522

Last edited: 2010-12-01 03:01

View 2 revisions

Version 0.98 loaded due to an existing typo. Would appreciate if someone can delete syncuser097.zip

baamster

baamster

2012-03-15 05:36

reporter   ~0031471

@cas Nice plugin. However, I now have converted my whole history instead of only the assigned to user. I would like to know who entered issues in the past and have the complete history available....is that possible as well?

cas

cas

2012-03-16 11:29

reporter   ~0031480

Could be an option in a next version...........
Is not a difficult change, simply adding Checkbox to convert only issues with a certain status.

cas

cas

2012-03-27 03:40

reporter   ~0031539

Added an option to only convert active issues

baamster

baamster

2012-04-03 03:27

reporter   ~0031591

@cas That is indeed an improvement. However, active issues should have a remaining history as well. I don't want (e.g.) the reporter to change, only the "assigned to" since I need to know from whom the issue originated and what happened in the meantime....

That status is the most improtant because no-one picks up issues that are assigned to other people...

cas

cas

2012-04-03 05:22

reporter   ~0031592

So that can be achieved relative easy in standard Mantis.
Simply filter this user in the View Issues option
Select all
Assign to someone else
Done !

cas

cas

2012-04-03 05:22

reporter  

Syncuser099.zip (6,188 bytes)
baamster

baamster

2012-04-13 02:11

reporter   ~0031647

That is not possible since the user is disabled and therefore not visable in the filter anymore. That means I have to enable him, then filter, reassign and disable again. Fine if it is one user, but we are talking about 50 users...lot of work....

cas

cas

2012-04-13 03:24

reporter  

Syncuser100.zip (6,247 bytes)
cas

cas

2012-04-13 03:25

reporter   ~0031648

In that case, use the latest version where you can specify alow and a high limit for the status. Issues within the range will be handled.
In your case, simply set both to "assigned"

baamster

baamster

2012-04-13 08:06

reporter   ~0031650

A, cheers...however:
APPLICATION ERROR 0000401
Database query failed. Error received from database was 0001064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=> 15' at line 1 for the query: update mantis_bug_tag_table set user_id=264 where user_id=130 and status <= 15 and status => 15.

Issue History

Date Modified Username Field Change
2006-07-06 05:23 cas New Issue
2006-07-06 05:23 cas File Added: syncusers.zip
2006-07-29 02:01 vboctor Category other => administration
2006-07-29 02:04 vboctor Note Added: 0013165
2006-07-30 06:32 cas Note Added: 0013169
2006-10-20 09:56 emathieu File Added: syncusers modified.zip
2006-10-20 09:58 emathieu Note Added: 0013630
2008-03-14 01:55 vboctor Tag Attached: patch
2009-03-24 05:26 cas Note Added: 0021176
2009-03-25 04:14 cas File Added: Syncuser95.zip
2009-03-25 04:14 cas Note Added: 0021185
2009-06-12 03:02 vboctor Tag Attached: plugin
2009-11-01 02:13 vboctor Relationship added related to 0010141
2009-11-01 02:13 vboctor Relationship added related to 0003116
2010-04-22 12:45 alitvak Note Added: 0025204
2010-04-24 02:21 cas Note Added: 0025240
2010-04-26 02:29 cas File Added: Syncuser.96.zip
2010-04-26 02:29 cas Note Added: 0025256
2010-11-30 11:22 matthew.bowman Note Added: 0027517
2010-11-30 11:28 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:28 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:40 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:40 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:40 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:41 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:41 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 11:42 matthew.bowman Note Edited: 0027517 View Revisions
2010-11-30 12:29 matthew.bowman Note Added: 0027518
2010-12-01 02:50 cas Note Added: 0027521
2010-12-01 02:57 cas File Added: Syncuser097.zip
2010-12-01 03:00 cas File Added: Syncuser098.zip
2010-12-01 03:01 cas Note Added: 0027522
2010-12-01 03:01 cas Note Edited: 0027522 View Revisions
2010-12-01 03:01 cas Note Edited: 0027521 View Revisions
2010-12-01 03:36 atrol File Deleted: Syncuser097.zip
2012-03-15 05:36 baamster Note Added: 0031471
2012-03-16 11:29 cas Note Added: 0031480
2012-03-27 03:40 cas Note Added: 0031539
2012-04-03 03:27 baamster Note Added: 0031591
2012-04-03 05:22 cas Note Added: 0031592
2012-04-03 05:22 cas File Added: Syncuser099.zip
2012-04-13 02:11 baamster Note Added: 0031647
2012-04-13 03:24 cas File Added: Syncuser100.zip
2012-04-13 03:25 cas Note Added: 0031648
2012-04-13 08:06 baamster Note Added: 0031650
2013-06-06 05:35 atrol Category administration => plug-ins