View Issue Details

IDProjectCategoryView StatusLast Update
0022360mantisbtrelationshipspublic2017-02-26 21:17
Reportervboctor Assigned Tovboctor  
Status closedResolutionfixed 
Product Version2.1.0 
Target Version2.2.0Fixed in Version2.2.0 
Summary0022360: relationship_add() doesn't return bug relationship information

This API advertises that it will return BugRelationshipData of the inserted bug relationship, but it does return the following:

  public 'id' => null
  public 'src_bug_id' => null
  public 'src_project_id' => null
  public 'dest_bug_id' => null
  public 'dest_project_id' => null
  public 'type' => null

Typically we just return id, like when creating a bug. This bug causes some callers to get the id from the relationship tables using code like the following:

    # The above function call into MantisBT does not seem to return a valid BugRelationshipData object.
    # So we call db_insert_id in order to find the id of the created relationship.
    $t_relationship_id = db_insert_id( db_get_table( 'bug_relationship' ) );
TagsNo tags attached.


Related Changesets

MantisBT: master 89345743

2017-02-11 16:08:38


Details Diff
Fix return values from relationship APIs

Fixes 0022360
Affected Issues
mod - api/soap/mc_issue_api.php Diff File
mod - core/relationship_api.php Diff File