Skip to content

Method addIssueLink() does not return a result (only NULL) #403

@igittigitt

Description

@igittigitt

I wondered why i always get NULL in return of calling addIssueLink($link) in my code. I've expected something JSON in return, as from the Jira API-Docs about issueLinks.

A quick look into the code (src/IssueLink/IssueLinkService.php) shows why. It's because the method addIssueLink just ends an do not return anything:

    public function addIssueLink($issueLink)
    {
        $this->log->info("addIssueLink=\n");

        $data = json_encode($issueLink);

        $this->log->debug("Create IssueLink=\n".$data);

        $url = $this->uri.'/issueLink';
        $type = 'POST';

        $this->exec($url, $data, $type);
    }

I've simply added a "return" in front of the last line, which gives me a TRUE on success and an json-string on error. I'm shure this can be done better but it should be done :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions