本文整理汇总了PHP中relationship_can_resolve_bug函数的典型用法代码示例。如果您正苦于以下问题:PHP relationship_can_resolve_bug函数的具体用法?PHP relationship_can_resolve_bug怎么用?PHP relationship_can_resolve_bug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了relationship_can_resolve_bug函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: relationship_get_summary_html_preview
/**
* print ALL the RELATIONSHIPS OF A SPECIFIC BUG
* @param integer $p_bug_id A bug identifier.
* @return string
*/
function relationship_get_summary_html_preview($p_bug_id)
{
$t_summary = '';
$t_show_project = false;
$t_relationship_all = relationship_get_all($p_bug_id, $t_show_project);
$t_relationship_all_count = count($t_relationship_all);
# prepare the relationships table
for ($i = 0; $i < $t_relationship_all_count; $i++) {
$t_summary .= relationship_get_details($p_bug_id, $t_relationship_all[$i], true, true, $t_show_project);
}
if (!is_blank($t_summary)) {
if (relationship_can_resolve_bug($p_bug_id) == false) {
$t_summary .= '<tr class="print"><td class="print" colspan=' . (5 + $t_show_project) . '><strong>' . lang_get('relationship_warning_blocking_bugs_not_resolved') . '</strong></td></tr>';
}
$t_summary = '<table width="100%" cellpadding="0" cellspacing="1">' . $t_summary . '</table>';
}
return $t_summary;
}
示例2: if
$t_reopen_issue = false;
if ( $t_existing_bug->status < $t_resolved_status &&
$t_updated_bug->status >= $t_resolved_status &&
$t_updated_bug->status < $t_closed_status ) {
$t_resolve_issue = true;
} else if ( $t_existing_bug->status < $t_closed_status &&
$t_updated_bug->status >= $t_closed_status ) {
$t_close_issue = true;
} else if ( $t_existing_bug->status >= $t_resolved_status &&
$t_updated_bug->status <= config_get( 'bug_reopen_status' ) ) {
$t_reopen_issue = true;
}
# If resolving or closing, ensure that all dependant issues have been resolved.
if ( ( $t_resolve_issue || $t_close_issue ) &&
!relationship_can_resolve_bug( $f_bug_id ) ) {
trigger_error( ERROR_BUG_RESOLVE_DEPENDANTS_BLOCKING, ERROR );
}
# Validate any change to the status of the issue.
if ( $t_existing_bug->status !== $t_updated_bug->status ) {
access_ensure_bug_level( config_get( 'update_bug_status_threshold' ), $f_bug_id );
if ( !bug_check_workflow( $t_existing_bug->status, $t_updated_bug->status ) ) {
error_parameters( lang_get( 'status' ) );
trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
}
if ( !access_has_bug_level( access_get_status_threshold( $t_updated_bug->status, $t_updated_bug->project_id ), $f_bug_id ) ) {
# The reporter may be allowed to close or reopen the issue regardless.
$t_can_bypass_status_access_thresholds = false;
if ( $t_close_issue &&
$t_existing_bug->status >= $t_resolved_status &&
示例3:
$t_resolve_issue = false;
$t_close_issue = false;
$t_reopen_issue = false;
if ($t_existing_bug->status < $t_resolved_status && $t_updated_bug->status >= $t_resolved_status && $t_updated_bug->status < $t_closed_status) {
$t_resolve_issue = true;
} else {
if ($t_existing_bug->status < $t_closed_status && $t_updated_bug->status >= $t_closed_status) {
$t_close_issue = true;
} else {
if ($t_existing_bug->status >= $t_resolved_status && $t_updated_bug->status <= config_get('bug_reopen_status')) {
$t_reopen_issue = true;
}
}
}
# If resolving or closing, ensure that all dependant issues have been resolved.
if (($t_resolve_issue || $t_close_issue) && !relationship_can_resolve_bug($f_bug_id)) {
trigger_error(ERROR_BUG_RESOLVE_DEPENDANTS_BLOCKING, ERROR);
}
# Validate any change to the status of the issue.
if ($t_existing_bug->status !== $t_updated_bug->status) {
access_ensure_bug_level(config_get('update_bug_status_threshold'), $f_bug_id);
if (!bug_check_workflow($t_existing_bug->status, $t_updated_bug->status)) {
error_parameters(lang_get('status'));
trigger_error(ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR);
}
if (!access_has_bug_level(access_get_status_threshold($t_updated_bug->status, $t_updated_bug->project_id), $f_bug_id)) {
# The reporter may be allowed to close or reopen the issue regardless.
$t_can_bypass_status_access_thresholds = false;
if ($t_close_issue && $t_existing_bug->status >= $t_resolved_status && $t_existing_bug->reporter_id === auth_get_current_user_id() && config_get('allow_reporter_close')) {
$t_can_bypass_status_access_thresholds = true;
} else {
示例4: lang_get
echo $f_bug_id;
?>
" />
<input type="hidden" name="status" value="<?php
echo $f_new_status;
?>
" />
<?php
echo lang_get($t_status_label . '_bug_title');
?>
</td>
</tr>
<?php
if ($f_new_status >= $t_resolved) {
if (relationship_can_resolve_bug($f_bug_id) == false) {
echo "<tr><td colspan=\"2\">" . lang_get('relationship_warning_blocking_bugs_not_resolved_2') . "</td></tr>";
}
}
?>
<?php
$t_current_resolution = $t_bug->resolution;
$t_bug_is_open = $t_current_resolution < $t_resolved;
if ($f_new_status >= $t_resolved && ($f_new_status < $t_closed || $t_bug_is_open)) {
?>
<!-- Resolution -->
<tr <?php
echo helper_alternate_class();
?>
>