View Issue Details

IDProjectCategoryView StatusLast Update
0022360mantisbtrelationshipspublic2017-02-26 21:17
ReportervboctorAssigned 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
mod - api/soap/mc_issue_api.php Diff File
mod - core/relationship_api.php Diff File

Issue History

Date Modified Username Field Change
2017-02-11 16:00 vboctor New Issue
2017-02-11 16:07 vboctor Assigned To => vboctor
2017-02-11 16:07 vboctor Status new => assigned
2017-02-11 16:07 vboctor Description Updated View Revisions
2017-02-12 19:00 vboctor Note Added: 0055658
2017-02-12 19:17 vboctor Target Version => 2.1.1
2017-02-19 20:01 vboctor Changeset attached => MantisBT master 89345743
2017-02-19 20:01 vboctor Status assigned => resolved
2017-02-19 20:01 vboctor Resolution open => fixed
2017-02-19 20:01 vboctor Fixed in Version => 2.2.0
2017-02-19 20:25 vboctor Target Version 2.1.1 => 2.2.0
2017-02-26 21:17 vboctor Status resolved => closed