View Issue Details

IDProjectCategoryView StatusLast Update
0005113mantisbtrelationshipspublic2005-04-18 10:18
Reporterwillkil Assigned Tothraxisp  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.0.0a1 
Summary0005113: include duplicate-of and has-duplicate relationship options when creating a clone
Description

When creating a clone of a bug, I would like duplicate-of and has-duplicate to be options in the relationship drop-down. I assume that their omission from the drop-down is by design. Here is my use case for this change:

I have imported changes from a subversion repository into a mantis database. The subversion repository itself was imported from a somewhat immature cvs repository. The change logs in the svn repository are not reliable enough for all the bug summaries simply to be set to the log entry for the corresponding change. Thus my summaries are svn r(nnn) - r(nnnn + 1), e.g. svn r7-r8. When I imported the changes, I added a file to the mantis database that was a patch of the changes from one repository revision to the next.

I have hundreds of these changes that I am processing manually because I need to merge development and production branches in the repository, but unfortunately there previously was no tracking of what changes took place in development vs. production branches. Thus I have to process all these changes to ensure there are no regressions (in either branch) during the merge.

In doing this, I realized that it is really nice to have separate bugs for the repository changes and for the actual bugs because sometimes bugs are recurrent, e.g. simple validation oversights like making certain a variable is set before using it. It is true that I could simply list in the notes all the repository changes that occur to fix a recurring bug, but notes obviously do not store information on relationships. It is obviously convenient to have relationship information stored by mantis because then I can simply click from a particular repository change to the bug discussion and then click to any other repository change for the same bug.

I could simply select related-to, but has-duplicate is actually the best description of the relationship between a bug and the corresponding repository change related to its fix. Furthermore, it would be convenient to clone bugs as duplicates as their resolutions are committed to the svn repository to continue tracking the relationship between repository changes and bugfixes in the future. It of course will make sense to record the bug_id in the repository as bugs are resolved, but that is a one-way map from repository changes to bugs, whereas the appropriate place to store the complementary map is in mantis, so storing repository revision ids in mantis is appropriate anyway.

I will be making this change to my local copy of mantis-0.19.2 regardless of whether or not others want this. Unless a mantis developer adds notes explaining why this change should not take place, I will submit a patch for this change.

TagsNo tags attached.

Relationships

child of 0004937 closedvboctor Mantis 1.0.0a1 Release 

Activities

mgerben

mgerben

2005-02-09 04:49

reporter   ~0009268

related to 0004791 perhaps, copying bugs

mgerben

mgerben

2005-02-09 05:03

reporter   ~0009270

Btw, Willkil, I would be interested in how you solved this, as I have similar problems.
I'm not afraid to hack into the Mantis code, but it's not my primary task, and if you've already done it I'd like to know how.
My email address is mgerben@yahoo.com

mgerben

mgerben

2005-02-09 05:13

reporter   ~0009271

Last edited: 2005-02-09 05:22

Got it already. In core/bug_api.php at line 614, function 'bug_copy' just before the return statement, I added these two lines:
These will always create an is-duplicate-of relationship; I did not implement any options here. One thing would be to intruduce a default parameter 'create_relationship=false'

Create relationship: New bug is duplicate of original bug

relationship_add($t_new_bug_id, $t_bug_id, BUG_DUPLICATE);

Matt_wc

Matt_wc

2005-02-09 20:14

reporter   ~0009275

Great stuff mgerben. I put the same change in, but just added an if statement that checks a config var.

Would be a good addition to 19.3

Matt_wc

Matt_wc

2005-02-09 20:16

reporter   ~0009277

willkil, would like to see your patch if available. cheers.

thraxisp

thraxisp

2005-04-14 11:49

reporter   ~0009816

Fixed in CVS. duplicate and duplicate-of are available as options, although child-of is still the default.

bug_report_page.php -> 1.50
bug_report_advanced_page.php -> 1.47

Issue History

Date Modified Username Field Change
2005-01-13 02:33 willkil New Issue
2005-02-09 04:49 mgerben Note Added: 0009268
2005-02-09 05:03 mgerben Note Added: 0009270
2005-02-09 05:13 mgerben Note Added: 0009271
2005-02-09 05:22 mgerben Note Edited: 0009271
2005-02-09 20:14 Matt_wc Note Added: 0009275
2005-02-09 20:16 Matt_wc Note Added: 0009277
2005-04-10 10:59 thraxisp Relationship added child of 0004937
2005-04-14 11:49 thraxisp Status new => resolved
2005-04-14 11:49 thraxisp Fixed in Version => 1.0.0rc1
2005-04-14 11:49 thraxisp Resolution open => fixed
2005-04-14 11:49 thraxisp Assigned To => thraxisp
2005-04-14 11:49 thraxisp Note Added: 0009816
2005-04-18 10:18 vboctor Status resolved => closed