diff --git a/lib/simpletest/todochecker.php b/lib/simpletest/todochecker.php
index 37c564e5ef9..172878dcd80 100644
--- a/lib/simpletest/todochecker.php
+++ b/lib/simpletest/todochecker.php
@@ -75,14 +75,16 @@ if (empty($found)) {
$issueurl = 'http://tracker.moodle.org/browse/' . $issueid;
// Make sure the issue is still open.
- if (issue_open($issueid)) {
+ list($issueopen, $issuesummary) = issue_info($issueid);
+ if ($issueopen) {
$issuename = $issueid;
} else {
$issuename = '' . $issueid . '';
$error = 'The associated tracker issue is Resolved.';
}
- $line = str_replace($issueid, '' . $issuename . '', htmlspecialchars($line));
+ $line = str_replace($issueid, '' . $issuename . '', htmlspecialchars($line));
} else {
$line = htmlspecialchars($line);
$error = 'No associated tracker issue.';
@@ -118,7 +120,7 @@ function check_to_dos($filepath) {
}
}
-function issue_open($issueid) {
+function issue_info($issueid) {
static $cache = array();
if (array_key_exists($issueid, $cache)) {
return $cache[$issueid];
@@ -126,10 +128,19 @@ function issue_open($issueid) {
$xmlurl = 'http://tracker.moodle.org/si/jira.issueviews:issue-xml/' . $issueid . '/' . $issueid . '.xml';
$content = download_file_content($xmlurl);
- $result = preg_match('/Unresolved<\/resolution>/', $content);
- $cache[$issueid] = $result;
- return $result;
+ // Get the status.
+ $open = preg_match('/Unresolved<\/resolution>/', $content);
+
+ // Get the summary.
+ $matches = array();
+ preg_match('/