View Issue Details

IDProjectCategoryView StatusLast Update
0012628mantisbtapi soappublic2014-02-07 04:15
Reporterrombert Assigned Torombert  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.2.4 
Target Version1.2.5Fixed in Version1.2.5 
Summary0012628: Update last change date for both bugs when updating a relationship
Description

When a bug relationship is added, only the 'source'
bug last change date is updated. This is inconsistent to, as
history is recorded for both bugs ( bug_relationship_add.php ):

<pre>

Add the new relationship

                   relationship_add( $f_src_bug_id,

$f_dest_bug_id, $f_rel_type );

                   # Add log line to the history (both bugs)
                   history_log_event_special( $f_src_bug_id,

BUG_ADD_RELATIONSHIP, $f_rel_type, $f_dest_bug_id );
history_log_event_special( $f_dest_bug_id,
BUG_ADD_RELATIONSHIP, relationship_get_complementary_type( $f_rel_type
), $f_src_bug_id );
(snip)

           # update bug last updated (just for the src bug)
           bug_update_date( $f_src_bug_id );

</pre>

This change will make sure that:

  • both bugs will have their last change time updated;
  • see if there are any other locations in the code that are missing one or both of the calls to history_log_event_special and fix that.
TagsNo tags attached.

Relationships

has duplicate 0008911 closeddregad adding relationship does only change field "last changed" of one issue 
related to 0014417 new Adding duplicate relationship should not set "modified" date of parent issue 
related to 0016933 closedvboctor Deleting relationship should set target bug's last updated 

Activities

dhx

dhx

2010-12-22 06:56

reporter   ~0027664

Thanks Robert. Let me know if you need a hand.

rombert

rombert

2010-12-22 07:01

reporter   ~0027665

@dhx : Sure thing, thanks.

cas

cas

2010-12-22 07:29

reporter   ~0027667

Not sure if I would agree that both bugs should be updated, i am inclined to say "no". Perhaps under certain types of relationships but definately not for all (for example parent-child should be maintained independent).
If such would come to core, I do hope this can be switched on and off.

rombert

rombert

2010-12-22 07:37

reporter   ~0027668

@cas: care to elaborate on why? IMO changing adding a relationship between two bugs means that both bugs have changed.

cas

cas

2010-12-22 08:57

reporter   ~0027670

@rombert: I reviewed the issue in more detail and have to withdraw my earlier comment. You referred to the moment of setting the relationship. Then clearly you are correct.
I somehow misread that you would update related bugs when one of them would change. Thorough reading does help!

rombert

rombert

2010-12-22 09:04

reporter   ~0027671

@cas: thanks for following-up. Good to know that I'm not breaking any expected behaviour.

rombert

rombert

2010-12-23 09:06

reporter   ~0027683

This should be fixed now. I found no inconsistencies is history_log calls.

Related Changesets

MantisBT: master 9b87be38

2010-12-23 08:45

rombert


Details Diff
Update last change date for both bugs when updating a relationship

Whenever a bug relation is added or updated, the last update field is
updated for the source bug. For consistency reasons, we know update that
field for the target bug as well.

Fixes 0012628: Update last change date for both bugs when updating a
relationship
Affected Issues
0012628
mod - bug_report.php Diff File
mod - api/soap/mc_issue_api.php Diff File
mod - bug_relationship_add.php Diff File

MantisBT: master-1.2.x 34dac373

2010-12-23 08:45

rombert


Details Diff
Update last change date for both bugs when updating a relationship

Whenever a bug relation is added or updated, the last update field is
updated for the source bug. For consistency reasons, we know update that
field for the target bug as well.

Fixes 0012628: Update last change date for both bugs when updating a
relationship
Affected Issues
0012628
mod - api/soap/mc_issue_api.php Diff File
mod - bug_relationship_add.php Diff File
mod - bug_report.php Diff File