View Issue Details

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

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

object(BugRelationshipData)[31]
  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:

mc_issue_relationship_add:
    # 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.

Activities

Related Changesets

MantisBT: master 89345743

2017-02-11 16:08:38

vboctor

Details Diff
Fix return values from relationship APIs

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