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

Undefined index when hovering over defect link


I’ve placed a Trac defect link in a test run, but when that run is displayed, when I hover over the link, an error is displayed in a box: “Undefined Index: Resolution”. An error is also put in the system log:
[ERROR] 2011-07-21 14:19:12 [276ms]: id:28446526 Undefined index: resolution [/var/www/testrail/app/plugins/defects/Trac.php:564] (at ErrorHandler::error)

This was working when I had this running on a test server, but the error would appear for ‘old’ tickets. If I created a new Trac ticket, or edited an old one, it worked fine. It now appears not to work at all.

If I click ‘Push’ or ‘Add’ when adding a test run, all works fine.
Our version of Trac is 0.11.7

Is this an error in Trac, or the plugin?


Hello Chris,

Thanks for your posting. Our plugin assumes that the ‘resolution’ property is always included in the Trac result which is not always the case as it seems. We will look into this and a fix will be included in the next TestRail version. You can patch your Trac plugin in the meantime by replacing the relevant line 564 in /var/www/testrail/app/plugins/defects/Trac.php with the following line:

'resolution' => arr::get($attributes, 'resolution'),

Please let me know in case you have any questions about this.



Thanks. I patched the file as requested, and it worked perfectly.
Thanks for the prompt response.