After results come back if it meets conditions then mark issue as CNW.
I came up with the following comments when I wrote my code:
$self = parse_url(url('', NULL, NULL, TRUE));
$result = url(variable_get('pifr_test_master_url', '') . 'pifr/file/' . $self['host'] . '/' . $file['filename']);
$changes = array();
$changes['nid'] = $file['nid'];
$changes['sid'] = variable_get('pifr_report_fail_status', '');
if ($file['cid']) {
$comment = url('node/' . $file['nid'], NULL, 'comment-' . $file['cid']);
$changes['comment'] = t('The file <a href="@comment">@name</a> failed testing.' .
' For more information please see the <a href="@results">detailed results</a>.',
array('@name' => $file['filename'], '@comment' => $comment, '@results' => $result));
}
else {
$changes['comment'] = t('The file @name in the original post failed testing.' .
' For more information please see the <a href="@results">detailed results</a>.',
array('@name' => $file['filename'], '!post' => $post, '@results' => $result));
}
project_issue_add_followup($changes);
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | pift_auto_followup.patch | 12.09 KB | hunmonk |
| #1 | result_reporting.png | 9.78 KB | boombatower |
Comments
Comment #1
boombatower commentedRelated interface.
Comment #2
hunmonk commentedi don't think your .png file is the result reporting picture ;)
Comment #3
boombatower commentedThat is just what I had for selected what status to set the issue to on a fail. The comments are in the code.
Comment #4
hunmonk commentedi'm postponing this for now. the auto status changing based on patch testing results has been a big headache every time we've tried it. i want to see the testing framework running smoothly for awhile before i install this feature in pift.
Comment #5
hunmonk commentedthis is now officially waiting on #326184: review test results for accuracy
Comment #6
hunmonk commentedhttp://drupal.org/node/326184#comment-1080349
Comment #7
hunmonk commenteddiscussing this feature a bit more w/ chx, we agreed that the most straightforward approach for the content of the comment would be something like:
The most recent patch failed testing.
'failed testing' would be an internal page link to the test result display table for the patch.
Comment #8
hunmonk commentedthis is now held up by http://drupal.org/node/327238
the reason is simple: without realtime knowledge of what files PIFT is sending for testing, it becomes much more difficult and messy to clearly determine the 'last' testable file posted to the issue.
Comment #9
catchIt's rare that I *subscribe* to issues, but this is one.
Comment #10
hunmonk commentedhttp://drupal.org/node/327238#comment-1089594
Comment #11
boombatower commentedThe messages above should provide a good starting point, or just use em.
Comment #12
hunmonk commentedhttp://drupal.org/node/326425 really needs to be finalized before we deploy anything in this patch on drupal.org, so if anybody can help there, i'd appreciate it.
Comment #13
hunmonk commentedattached patch has been committed to 5.x and HEAD, and pretty heavily tested on a local install.