Skip to content

Commit

Permalink
Fix showing of workflow transitions
Browse files Browse the repository at this point in the history
The workflow transition were not being shown due to accessing the wrong variables when rendering the page.

Fixes #17658
  • Loading branch information
vboctor committed Oct 26, 2014
1 parent 3b6cc00 commit 9eb242a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions manage_config_workflow_page.php
Expand Up @@ -104,13 +104,13 @@ function set_color_override( $p_level_file, $p_level_global, $p_level_project )
* @return string
*/
function show_flag( $p_from_status_id, $p_to_status_id ) {
global $g_can_change_workflow, $g_overrides,
$t_file_workflow, $t_global_workflow, $t_project_workflow,
global $g_can_change_workflow,
$g_file_workflow, $g_global_workflow, $g_project_workflow,
$t_resolved_status, $t_reopen_status, $t_reopen_label;
if( $p_from_status_id <> $p_to_status_id ) {
$t_file = isset( $t_file_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0 ;
$t_global = isset( $t_global_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0 ;
$t_project = isset( $t_project_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0;
$t_file = isset( $g_file_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0;
$t_global = isset( $g_global_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0;
$t_project = isset( $g_project_workflow['exit'][$p_from_status_id][$p_to_status_id] ) ? 1 : 0;

$t_color = set_color_override( $t_file, $t_global, $t_project );
if( $g_can_change_workflow && $t_color != '' ) {
Expand Down Expand Up @@ -379,7 +379,7 @@ function access_end() {
# gather all versions of the workflow
$g_file_workflow = workflow_parse( config_get_global( 'status_enum_workflow' ) );
$g_global_workflow = workflow_parse( config_get( 'status_enum_workflow', null, ALL_USERS, ALL_PROJECTS ) );
$g_project_workflow = workflow_parse( config_get( 'status_enum_workflow' ) );
$g_project_workflow = workflow_parse( config_get( 'status_enum_workflow', null, ALL_USERS, $t_project ) );

# validate the project workflow
$t_validation_result = '';
Expand Down

0 comments on commit 9eb242a

Please sign in to comment.