Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Redmine integration plugin, can not parse "memberships" in project


#1

Hi all,
I need some help with customization plugin TestRail and Redmine.
I have already managed to add some fields(like custom field Opened in version, issue_priority ) to form in plugin to push bugs from TestRail to Redmine, but stucked with Assignee field.
According to Redmine’s API I need to create GET Request - "/projects/ID/memberships.xml"
I have created following function inside my PHP plugin:

public function get_memberships($project_id)
{
    $response = $this->_send_command('GET', 
        "projects/$project_id/memberships");
    return $response->memberships; //TODO
}

When I pressing button “Push” in TestRail I received an error:

Undefined property: stdClass::$name

As I see there is no such variable in my PHP plugin, so the problem is somewhere higher. And Using Wireshark shiffer I can see that Redmine provides me response:

Could you help me and point how to debug the problem? Why TestRail does not show response from Redmine?


#2

Hi Sergey,

Thanks for your posting. You should see additional details (e.g. file and line number of the error) in TestRail’s log file (path can be found in TestRail’s config.php). This should help troubleshooting this issue further. You can also use TestRail’s log and debug features to add log messages to your custom code:

http://docs.gurock.com/testrail-faq/system-script-debug

Cheers,
Tobias