Index: pift.cron.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/pift.cron.inc,v retrieving revision 1.46 diff -u -r1.46 pift.cron.inc --- pift.cron.inc 24 Dec 2009 02:31:49 -0000 1.46 +++ pift.cron.inc 5 Jan 2010 22:57:19 -0000 @@ -469,9 +469,21 @@ * @param string $filename Name of file. */ function pift_cron_auto_followup($nid, $cid, $filename) { + // Add fail tag to issue. + $node = node_load($nid); + $tags = taxonomy_implode_tags($node->taxonomy, PIFR_FOLLOWUP_VOCAB); + if (strpos($tags, PIFR_FOLLOWUP_TAG) === FALSE) { + $tags .= PIFR_FOLLOWUP_TAG; + } + project_issue_add_auto_followup(array( 'nid' => $nid, 'sid' => PIFT_FOLLOWUP_FAIL, 'comment' => theme('pift_auto_followup', 'fail', $nid, $cid, $filename), + 'taxonomy' => array( + 'tags' => array( + PIFR_FOLLOWUP_VOCAB => $tags, + ), + ), )); } Index: pift.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/pift.admin.inc,v retrieving revision 1.13 diff -u -r1.13 pift.admin.inc --- pift.admin.inc 23 Oct 2009 03:06:32 -0000 1.13 +++ pift.admin.inc 5 Jan 2010 22:57:19 -0000 @@ -78,6 +78,23 @@ '#options' => project_issue_state(), '#required' => TRUE, ); + $form['interface']['pifr_followup_fail_vocab'] = array( + '#type' => 'select', + '#title' => t('Followup issue fail - vocab'), + '#description' => t('The vocabulary to add tag to when testing fails.'), + '#options' => array(), + '#default_value' => PIFR_FOLLOWUP_VOCAB, + ); + $vocabularies = taxonomy_get_vocabularies(); + foreach ($vocabularies as $vocabulary) { + $form['interface']['pifr_followup_fail_vocab']['#options'][$vocabulary->vid] = $vocabulary->name; + } + $form['interface']['pifr_followup_fail_tag'] = array( + '#type' => 'textfield', + '#title' => t('Followup issue fail - tag'), + '#description' => t('The tag to add when testing fails.'), + '#default_value' => PIFR_FOLLOWUP_TAG, + ); $form['criteria'] = array( '#type' => 'fieldset', Index: pift.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/pift.module,v retrieving revision 1.36 diff -u -r1.36 pift.module --- pift.module 5 Jan 2010 21:49:25 -0000 1.36 +++ pift.module 5 Jan 2010 22:57:20 -0000 @@ -18,6 +18,8 @@ define('PIFT_DESCRIPTION', variable_get('pift_description', '')); define('PIFT_FOLLOWUP_FAIL', variable_get('pift_followup_fail', 0)); define('PIFT_FOLLOWUP_RETEST', variable_get('pift_followup_retest', 0)); +define('PIFR_FOLLOWUP_VOCAB', variable_get('pift_followup_vocab', 9)); +define('PIFR_FOLLOWUP_TAG', variable_get('pift_followup_tag', 'failed testing')); define('PIFT_REGEX', variable_get('pift_regex', '/(\.diff|\.patch)$/')); define('PIFT_PID', variable_get('pift_pid', -1)); define('PIFT_RETEST', variable_get('pift_retest', 24 * 60 * 60));