public function create($issueId, array $params = [])
    {
        $defaults = [
            'relation_type' => 'relates',
            'issue_to_id' => null,
            'delay' => null,
        ];

        $params = $this->sanitizeParams($defaults, $params);

        $params = json_encode(['relation' => $params]);

        return json_decode($this->post('/issues/'.urlencode($issueId).'/relations.json', $params), true);
    }
public function create($issueId, array $params = [])
    {
        $defaults = [
            'relation_type' => 'relates',
            'issue_to_id' => null,
            'delay' => null,
        ];

        $params = $this->sanitizeParams($defaults, $params);

        $params = json_encode(['relation' => $params]);

        return json_decode($this->post('/issues/'.urlencode($issueId).'/relations.json', $params), true);
    }
public function create ( $ issueId , array $ params = [ ] ) { $ defaults = [ 'relation_type' => 'relates' , 'issue_to_id' => null , 'delay' => null , ] ; $ params = $ this -> sanitizeParams ( $ defaults , $ params ) ; $ params = json_encode ( [ 'relation' => $ params ] ) ; return json_decode ( $ this -> post ( '/issues/' . urlencode ( $ issueId ) . '/relations.json' , $ params ) , true ) ; }
Create a new issue relation.

@see http://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations#POST

@param int   $issueId the ID of the issue we are creating the relation on
@param array $params  the new issue relation data

@return array
Create a new issue relation .