当前位置: 首页>>代码示例>>PHP>>正文


PHP bug_is_resolved函数代码示例

本文整理汇总了PHP中bug_is_resolved函数的典型用法代码示例。如果您正苦于以下问题:PHP bug_is_resolved函数的具体用法?PHP bug_is_resolved怎么用?PHP bug_is_resolved使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bug_is_resolved函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: custom_function_default_roadmap_print_issue

function custom_function_default_roadmap_print_issue($p_issue_id, $p_issue_level = 0)
{
    static $t_status;
    $t_bug = bug_get($p_issue_id);
    if (bug_is_resolved($p_issue_id)) {
        $t_strike_start = '<strike>';
        $t_strike_end = '</strike>';
    } else {
        $t_strike_start = $t_strike_end = '';
    }
    if ($t_bug->category_id) {
        $t_category_name = category_get_name($t_bug->category_id);
    } else {
        $t_category_name = '';
    }
    $t_category = is_blank($t_category_name) ? '' : '<b>[' . string_display_line($t_category_name) . ']</b> ';
    echo utf8_str_pad('', $p_issue_level * 6, '&#160;'), '- ', $t_strike_start, string_get_bug_view_link($p_issue_id), ': ', $t_category, string_display_line_links($t_bug->summary);
    if ($t_bug->handler_id != 0) {
        echo ' (', prepare_user_name($t_bug->handler_id), ')';
    }
    if (!isset($t_status[$t_bug->status])) {
        $t_status[$t_bug->status] = get_enum_element('status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
    }
    echo ' - ', $t_status[$t_bug->status], $t_strike_end, '.<br />';
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:25,代码来源:custom_function_api.php

示例2: custom_function_default_roadmap_print_issue

function custom_function_default_roadmap_print_issue($p_issue_id, $p_issue_level = 0)
{
    $t_bug = bug_get($p_issue_id);
    if (bug_is_resolved($p_issue_id)) {
        $t_strike_start = '<strike>';
        $t_strike_end = '</strike>';
    } else {
        $t_strike_start = $t_strike_end = '';
    }
    $t_category = is_blank($t_bug->category) ? '' : '<b>[' . $t_bug->category . ']</b> ';
    echo str_pad('', $p_issue_level * 6, '&nbsp;'), '- ', $t_strike_start, string_get_bug_view_link($p_issue_id), ': ', $t_category, string_display_line_links($t_bug->summary);
    if ($t_bug->handler_id != 0) {
        echo ' (', prepare_user_name($t_bug->handler_id), ')';
    }
    echo ' - ', get_enum_element('status', $t_bug->status), $t_strike_end, '.<br />';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:16,代码来源:custom_function_api.php

示例3: access_can_reopen_bug

/**
 * Check if the specified bug can be reopened
 * @param BugData $p_bug Bug to check access against
 * @param int|null $p_user_id integer representing user id, defaults to null to use current user
 * @return bool whether user has access to reopen bugs
 * @access public
 */
function access_can_reopen_bug($p_bug, $p_user_id = null)
{
    if (!bug_is_resolved($p_bug->id)) {
        # Can't reopen a bug that's not resolved
        return false;
    }
    if ($p_user_id === null) {
        $p_user_id = auth_get_current_user_id();
    }
    # If allow_reporter_reopen is enabled, then reporters can always reopen
    # their own bugs as long as their access level is reporter or above
    if (ON == config_get('allow_reporter_reopen', null, null, $p_bug->project_id) && bug_is_user_reporter($p_bug->id, $p_user_id) && access_has_project_level(config_get('report_bug_threshold', null, $p_user_id, $p_bug->project_id), $p_bug->project_id, $p_user_id)) {
        return true;
    }
    # Other users's access level must allow them to reopen bugs
    $t_reopen_bug_threshold = config_get('reopen_bug_threshold', null, null, $p_bug->project_id);
    if (access_has_bug_level($t_reopen_bug_threshold, $p_bug->id, $p_user_id)) {
        $t_reopen_status = config_get('bug_reopen_status', null, null, $p_bug->project_id);
        # User must be allowed to change status to reopen status
        $t_reopen_status_threshold = access_get_status_threshold($t_reopen_status, $p_bug->project_id);
        return access_has_bug_level($t_reopen_status_threshold, $p_bug->id, $p_user_id);
    }
    return false;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:access_api.php

示例4: bug_is_overdue

/**
 * Check if a given bug is overdue
 * @param int p_bug_id integer representing bug id
 * @return bool true if bug is overdue, false otherwise
 * @access public
 * @uses database_api.php
 */
function bug_is_overdue($p_bug_id)
{
    $t_due_date = bug_get_field($p_bug_id, 'due_date');
    if (!date_is_null($t_due_date)) {
        $t_now = db_now();
        if ($t_now > $t_due_date) {
            if (!bug_is_resolved($p_bug_id)) {
                return true;
            }
        }
    }
    return false;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:20,代码来源:bug_api.php

示例5: add_bug

 private function add_bug(&$p_email, $p_overwrite_project_id = FALSE)
 {
     $this->show_memory_usage('Start add bug');
     //Merge References and In-Reply-To headers into one array
     $t_references = $p_email['References'];
     $t_references[] = $p_email['In-Reply-To'];
     if ($this->_mail_add_bugnotes) {
         $t_bug_id = $this->mail_is_a_bugnote($p_email['Subject'], $t_references);
     } else {
         $t_bug_id = FALSE;
     }
     if ($t_bug_id !== FALSE && !bug_is_readonly($t_bug_id)) {
         // @TODO@ Disabled for now until we find a good solution on how to handle the reporters possible lack of access permissions
         //			access_ensure_bug_level( config_get( 'add_bugnote_threshold' ), $f_bug_id );
         $t_description = $p_email['X-Mantis-Body'];
         $t_description = $this->identify_replies($t_description);
         $t_description = $this->strip_signature($t_description);
         $t_description = $this->add_additional_info('note', $p_email, $t_description);
         $t_project_id = bug_get_field($t_bug_id, 'project_id');
         ERP_set_temporary_overwrite('project_override', $t_project_id);
         # Event integration
         # Core mantis event already exists within bugnote_add function
         $t_description = event_signal('EVENT_ERP_BUGNOTE_DATA', $t_description, $t_bug_id);
         if (bug_is_resolved($t_bug_id)) {
             # Reopen issue and add a bug note
             bug_reopen($t_bug_id, $t_description);
         } elseif (!is_blank($t_description)) {
             # Add a bug note
             bugnote_add($t_bug_id, $t_description);
         }
     } elseif ($this->_mail_add_bug_reports) {
         // @TODO@ Disabled for now until we find a good solution on how to handle the reporters possible lack of access permissions
         //			access_ensure_project_level( config_get('report_bug_threshold' ) );
         $f_master_bug_id = $t_bug_id !== FALSE && bug_is_readonly($t_bug_id) ? $t_bug_id : 0;
         $this->fix_empty_fields($p_email);
         $t_project_id = $p_overwrite_project_id === FALSE ? $this->_mailbox['project_id'] : $p_overwrite_project_id;
         ERP_set_temporary_overwrite('project_override', $t_project_id);
         $t_bug_data = new BugData();
         $t_bug_data->build = '';
         $t_bug_data->platform = '';
         $t_bug_data->os = '';
         $t_bug_data->os_build = '';
         $t_bug_data->version = '';
         $t_bug_data->profile_id = 0;
         $t_bug_data->handler_id = 0;
         $t_bug_data->view_state = (int) config_get('default_bug_view_status');
         $t_bug_data->category_id = (int) $this->_mailbox['global_category_id'];
         $t_bug_data->reproducibility = (int) config_get('default_bug_reproducibility');
         $t_bug_data->severity = (int) config_get('default_bug_severity');
         $t_bug_data->priority = (int) ($this->_mail_use_bug_priority ? $p_email['Priority'] : config_get('default_bug_priority'));
         $t_bug_data->projection = (int) config_get('default_bug_projection');
         $t_bug_data->eta = (int) config_get('default_bug_eta');
         $t_bug_data->resolution = config_get('default_bug_resolution');
         $t_bug_data->status = config_get('bug_submit_status');
         $t_bug_data->summary = $p_email['Subject'];
         $t_description = $p_email['X-Mantis-Body'];
         $t_description = $this->strip_signature($t_description);
         $t_description = $this->add_additional_info('issue', $p_email, $t_description);
         $t_bug_data->description = $t_description;
         $t_bug_data->steps_to_reproduce = config_get('default_bug_steps_to_reproduce');
         $t_bug_data->additional_information = config_get('default_bug_additional_info');
         $t_bug_data->due_date = date_get_null();
         $t_bug_data->project_id = $t_project_id;
         $t_bug_data->reporter_id = $p_email['Reporter_id'];
         // This function might do stuff that EmailReporting cannot handle. Disabled
         //helper_call_custom_function( 'issue_create_validate', array( $t_bug_data ) );
         // @TODO@ Disabled for now but possibly needed for other future features
         # Validate the custom fields before adding the bug.
         /*			$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id );
         			foreach( $t_related_custom_field_ids as $t_id )
         			{
         				$t_def = custom_field_get_definition( $t_id );
         
         				# Produce an error if the field is required but wasn't posted
         				if ( !gpc_isset_custom_field( $t_id, $t_def['type'] ) &&
         					( $t_def['require_report'] ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_ENUM ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_LIST ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST ||
         						$t_def['type'] == CUSTOM_FIELD_TYPE_RADIO ) ) {
         					error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
         					trigger_error( ERROR_EMPTY_FIELD, ERROR );
         				}
         				if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) )
         				{
         					error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
         					trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
         				}
         			}*/
         # Allow plugins to pre-process bug data
         $t_bug_data = event_signal('EVENT_REPORT_BUG_DATA', $t_bug_data);
         $t_bug_data = event_signal('EVENT_ERP_REPORT_BUG_DATA', $t_bug_data);
         # Create the bug
         $t_bug_id = $t_bug_data->create();
         // @TODO@ Disabled for now but possibly needed for other future features
         # Handle custom field submission
         /*			foreach( $t_related_custom_field_ids as $t_id )
         {
         				# Do not set custom field value if user has no write access.
         				if( !custom_field_has_write_access( $t_id, $t_bug_id ) )
//.........这里部分代码省略.........
开发者ID:JeromyK,项目名称:EmailReporting,代码行数:101,代码来源:mail_api.php

示例6: access_can_reopen_bug

/**
 * Check if the specified bug can be reopened
 * @param BugData $p_bug Bug to check access against
 * @param int|null $p_user_id integer representing user id, defaults to null to use current user
 * @return bool whether user has access to reopen bugs
 * @access public
 */
function access_can_reopen_bug($p_bug, $p_user_id = null)
{
    if (!bug_is_resolved($p_bug->id)) {
        # Can't reopen a bug that's not resolved
        return false;
    }
    if ($p_user_id === null) {
        $p_user_id = auth_get_current_user_id();
    }
    # If allow_reporter_reopen is enabled, then reporters can always reopen their own bugs
    if (ON == config_get('allow_reporter_reopen', null, null, $p_bug->project_id) && bug_is_user_reporter($p_bug->id, $p_user_id)) {
        return true;
    }
    $t_reopen_status = config_get('reopen_bug_threshold', null, null, $p_bug->project_id);
    $t_reopen_status_threshold = access_get_status_threshold($t_reopen_status, $p_bug->project_id);
    return access_has_bug_level($t_reopen_status_threshold, $p_bug->id, $p_user_id);
}
开发者ID:raultm,项目名称:mantisbt,代码行数:24,代码来源:access_api.php

示例7: bug_cache_database_result

     }
     bug_cache_database_result($t_row);
     # check limit_Reporter (Issue #4770)
     # reporters can view just issues they reported
     if (ON === $t_limit_reporters && $t_user_access_level_is_reporter && !bug_is_user_reporter($t_row['id'], $t_user_id)) {
         continue;
     }
     $t_issue_id = $t_row['id'];
     $t_issue_parent = $t_row['source_bug_id'];
     $t_parent_version = $t_row['parent_version'];
     if (!helper_call_custom_function('roadmap_include_issue', array($t_issue_id))) {
         continue;
     }
     if (!isset($t_issues_counted[$t_issue_id])) {
         $t_issues_planned++;
         if (bug_is_resolved($t_issue_id)) {
             $t_issues_resolved++;
         }
         $t_issues_counted[$t_issue_id] = true;
     }
     if (0 === strcasecmp($t_parent_version, $t_version)) {
         $t_issue_ids[] = $t_issue_id;
         $t_issue_parents[] = $t_issue_parent;
     } else {
         if (!in_array($t_issue_id, $t_issue_ids)) {
             $t_issue_ids[] = $t_issue_id;
             $t_issue_parents[] = null;
         }
     }
     $t_issue_handlers[] = $t_row['handler_id'];
 }
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:roadmap_page.php

示例8: gantt_get_resolution_date

function gantt_get_resolution_date($p_bug_id)
{
    if (bug_is_resolved($p_bug_id)) {
        $t_history = history_get_raw_events_array($p_bug_id);
        $t_resolution_date = null;
        foreach ($t_history as $t_item) {
            if ('status' == $t_item['field']) {
                if ($t_item['new_value'] >= config_get('bug_resolved_status_threshold')) {
                    $t_resolution_date = $t_item['date'];
                }
            }
        }
        return $t_resolution_date;
    }
    // The issue is not resolved yet
    return null;
}
开发者ID:martijnveen,项目名称:GanttChart,代码行数:17,代码来源:gantt_api.php


注:本文中的bug_is_resolved函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。