コード例 #1
0
/**
 * Print table body
 * @param $status_cols
 */
function print_tbody($status_cols)
{
    $storyboard_db_api = new storyboard_db_api();
    $project_spec_bug_ids = $storyboard_db_api->get_bugarray_by_project(helper_get_current_project());
    $types = $storyboard_db_api->select_all_types();
    echo '<tbody>';
    foreach ($types as $type) {
        echo '<tr>';
        echo '<td class="category">' . $type[1] . '</td>';
        foreach ($status_cols as $status_col) {
            echo '<td class="story_baord">';
            foreach ($project_spec_bug_ids as $project_spec_bug_id) {
                $card = $storyboard_db_api->select_story_card($project_spec_bug_id);
                if ($card[2] == $type[0]) {
                    $bug_status = bug_get_field($project_spec_bug_id, 'status');
                    if ($bug_status == $status_col) {
                        echo '<a href="' . string_get_bug_view_url($project_spec_bug_id) . '" class="rcv_tooltip">';
                        echo '<div class="story_card">';
                        echo string_display_line(bug_format_id($project_spec_bug_id));
                        echo '<span>';
                        print_story_card_title($project_spec_bug_id);
                        print_story_card_info('summary', bug_get_field($project_spec_bug_id, 'summary'), false);
                        print_story_card_info('description', bug_get_text_field($project_spec_bug_id, 'description'), false);
                        print_story_card_info('card_risk', $card[3], true);
                        print_story_card_info('card_story_pt', $card[4], true);
                        print_story_card_info('card_story_pt_post', $card[5], true);
                        print_story_card_info('card_acc_crit', $card[6], true);
                        echo '</span>';
                        echo '</div>';
                        echo '</a><br/><br/><br/>';
                    }
                }
            }
            echo '</td>';
        }
        echo '</tr>';
    }
    echo '</tbody>';
}
コード例 #2
0
<?php

auth_reauthenticate();
access_ensure_global_level(config_get('AccessLevel'));
form_security_validate('plugin_StoryBoard_config_update');
require_once STORYBOARD_CORE_URI . 'storyboard_constant_api.php';
require_once STORYBOARD_CORE_URI . 'storyboard_config_api.php';
require_once STORYBOARD_CORE_URI . 'storyboard_db_api.php';
$storyboard_config_api = new storyboard_config_api();
$storyboard_db_api = new storyboard_db_api();
$option_change = gpc_get_bool('change', false);
$option_addtype = gpc_get_bool('addtype', false);
$option_deltype = gpc_get_bool('deletetype', false);
$option_changetype = gpc_get_bool('changetype', false);
/**
 * Submit configuration changes
 */
if ($option_change) {
    $storyboard_config_api->updateValue('AccessLevel', ADMINISTRATOR);
    $storyboard_config_api->updateButton('ShowInFooter');
    if (!empty($_POST['status_cols'])) {
        foreach ($_POST['status_cols'] as $status_cols) {
            $status_cols = gpc_get_int_array('status_cols');
            if (plugin_config_get('status_cols') != $status_cols) {
                plugin_config_set('status_cols', $status_cols);
            }
        }
    }
}
/**
 * Add a type
コード例 #3
0
 /**
  * Update custom plugin fields
  *
  * @param $event
  * @param BugData $bug
  */
 function bugUpdateFields($event, BugData $bug)
 {
     require_once STORYBOARD_CORE_URI . 'storyboard_db_api.php';
     $storyboard_db_api = new storyboard_db_api();
     if (substr(MANTIS_VERSION, 0, 4) > '1.2.') {
         $bug_id = $bug->id;
     } else {
         $bug_id = gpc_get_int('bug_id', null);
     }
     $card_type = gpc_get_string('card_type', '');
     $card_type_id = null;
     if (!is_null($card_type)) {
         $card_type_id = $storyboard_db_api->select_typeid_by_typestring($card_type);
     }
     $card_risk = gpc_get_string('card_risk', '');
     $card_story_pt = gpc_get_string('card_story_pt', '');
     $card_story_pt_post = gpc_get_string('card_story_pt_post', '');
     $card_acc_crit = gpc_get_string('card_acc_crit', '');
     switch ($event) {
         case 'EVENT_REPORT_BUG':
             $storyboard_db_api->insert_story_card($bug_id, $card_type_id, $card_risk, $card_story_pt, $card_story_pt_post, $card_acc_crit);
             break;
         case 'EVENT_UPDATE_BUG':
             $storyboard_db_api->update_story_card($bug_id, $card_type_id, $card_risk, $card_story_pt, $card_story_pt_post, $card_acc_crit);
             break;
     }
 }
コード例 #4
0
<?php

require_once STORYBOARD_CORE_URI . 'storyboard_constant_api.php';
require_once STORYBOARD_CORE_URI . 'storyboard_config_api.php';
require_once STORYBOARD_CORE_URI . 'storyboard_db_api.php';
$storyboard_config_api = new storyboard_config_api();
$storyboard_db_api = new storyboard_db_api();
auth_reauthenticate();
access_ensure_global_level(plugin_config_get('AccessLevel'));
html_page_top1(plugin_lang_get('config_title'));
html_page_top2();
print_manage_menu();
echo '<br/>';
echo '<form action="' . plugin_page('config_update') . '" method="post">';
echo form_security_field('plugin_StoryBoard_config_update');
$storyboard_config_api->printTableHead();
$storyboard_config_api->printTableRowHead();
$storyboard_config_api->printFormTitle(2, 'config_caption');
echo '</tr>';
$storyboard_config_api->printTableRowHead();
$storyboard_config_api->printFormCategory(1, 'config_accesslevel', true);
echo '<td width="200px" colspan="1">';
echo '<select name="AccessLevel">';
print_enum_string_option_list('access_levels', plugin_config_get('AccessLevel', PLUGINS_STORYBOARD_THRESHOLD_LEVEL_DEFAULT));
echo '</select>';
echo '</td>';
echo '</tr>';
$storyboard_config_api->printTableRowHead();
$storyboard_config_api->printFormCategory(1, 'config_footer', false);
$storyboard_config_api->printButton('ShowInFooter');
echo '</tr>';
コード例 #5
0
 /**
  * @param $input
  * @param $input_value
  */
 public function printBugUpdateSelectInput($input, $input_value)
 {
     $storyboard_db_api = new storyboard_db_api();
     $values = array();
     $value_rows = $storyboard_db_api->select_all_types();
     foreach ($value_rows as $value_row) {
         $values[] = $value_row[1];
     }
     $this->printRow();
     echo '<td class="category"><label for="' . $input . '">' . plugin_lang_get($input) . '</label></td>';
     echo '<td colspan="5">';
     echo '<span class="select">';
     echo '<select ' . helper_get_tab_index() . ' id="' . $input . '" name="' . $input . '">';
     echo '<option value=""></option>';
     if (!is_null($values)) {
         foreach ($values as $value) {
             echo '<option value="' . $value . '"';
             if ($value == $input_value) {
                 echo ' selected';
             }
             echo '>' . $value . '</option>';
         }
     }
     echo '</select>&nbsp';
     echo '</td>';
     echo '</tr>';
 }