View Issue Details

IDProjectCategoryView StatusLast Update
0003931Mantis BT @ CentOSFunctional Issuespublic2010-01-15 18:29
Reportertoracat 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Summary0003931: transferring users from entries closed as a duplicate
DescriptionWhen a bug entry is labeled as a duplicate of another and then closed, the original poster and those on the monitor list of the closed ticket should be automatically transferred to the monitor list of the other one. Can this feature be added to mantis?
Additional InformationFor example, #3899 was closed as a dupe of #3897. I'd like to get the OP of 3899 to follow 3897. Could some administrator do this manually?
TagsNo tags attached.

Activities

range

range

2009-10-23 22:20

administrator   ~0010134

I think bugzilla can do that, I'd have to look if mantis could also do that.

-> ToDo.

2010-01-10 16:30

 

bug_api.diff (1,295 bytes)
--- mantisbt-1.1.8/core/bug_api.php     2009-06-08 22:48:31.000000000 +0300
+++ mantis/core/bug_api.php     2010-01-10 18:18:01.000000000 +0200
@@ -1280,6 +1280,22 @@
                                        history_log_event_special( $p_duplicate_id, BUG_ADD_RELATIONSHIP, BUG_HAS_DUPLICATE, $p_bug_id );
                                }
                        }
+
+                       # -------------- CentOS #3931
+                        # Patched by mark@mark.org.il
+                        $query = sprintf("SELECT *
+                                          FROM %s
+                                          WHERE bug_id = %d", config_get( 'mantis_bug_monitor_table' ) , $p_bug_id);
+                        $result = db_query( $query );
+                        $t_count = db_num_rows( $result );
+
+                        for ( $i = 0; $i < $t_count; $i++ ) {
+                                $row = db_fetch_array($result);
+                               bug_unmonitor($p_bug_id, $row['user_id']);
+                               bug_monitor($p_duplicate_id, $row['user_id']);
+                        }
+                        ## END PATCH
+

                        bug_set_field( $p_bug_id, 'duplicate_id', (int)$p_duplicate_id );
                }
bug_api.diff (1,295 bytes)
doot

doot

2010-01-10 16:30

reporter   ~0010748

See attached patch for 1.1.8 -- moves subscribers when a bug is resolved with duplicate ID. Verified on test install.
range

range

2010-01-10 16:38

administrator   ~0010749

And already incorporated here. See 4134 (where I subscribed manually) and 4133 to which I got moved.

How To:

Change Status -> Resolved

Resolve with "Duplicate" and enter duplicate id. People get moved to "duplicate id".
doot

doot

2010-01-10 21:20

reporter   ~0010751

Mantis issue raised upstream @ http://www.mantisbt.org/bugs/view.php?id=11375
range

range

2010-01-10 21:24

administrator   ~0010752

Fixed on bugs.centos.org
toracat

toracat

2010-01-15 18:29

manager   ~0010779

Reopening this ticket just to add a note: the updated version of mantis that includes this feature is forthcoming.

[ quoting dhx (mantis developer) ]
"Committed to 1.3.x and also backported to the 1.2.x branch because it is something that strikes me as being more of a defect than a feature."

Thanks, doot, for your contribution. :)

Issue History

Date Modified Username Field Change
2009-10-23 18:13 toracat New Issue
2009-10-23 22:20 range Note Added: 0010134
2010-01-10 16:30 doot File Added: bug_api.diff
2010-01-10 16:30 doot Note Added: 0010748
2010-01-10 16:38 range Note Added: 0010749
2010-01-10 21:20 doot Note Added: 0010751
2010-01-10 21:24 range Note Added: 0010752
2010-01-10 21:24 range Status new => resolved
2010-01-10 21:24 range Resolution open => fixed
2010-01-15 18:29 toracat Note Added: 0010779
2010-01-15 18:29 toracat Status resolved => feedback
2010-01-15 18:29 toracat Resolution fixed => reopened
2010-01-15 18:29 toracat Status feedback => resolved
2010-01-15 18:29 toracat Resolution reopened => fixed