Skip to content

Commit

Permalink
Fix view state references
Browse files Browse the repository at this point in the history
At the moment we have two configs that related to view state enum:

- `view_state` - which is used for issue and issue notes view state.
- `project_view_state` - which is used for projects.

This commit fixes cases where the wrong view state was used for the scenario at hand.
In the future, we may want to consider have a different view state enum for issues vs. issue notes.

Fixes #10411
  • Loading branch information
vboctor authored and atrol committed Oct 5, 2018
1 parent 810c0a5 commit 25eec2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bug_actiongroup_page.php
Expand Up @@ -409,7 +409,7 @@
<label class="lbl padding-6"><?php echo lang_get( 'private' ); ?></label>
<?php
} else {
echo get_enum_element( 'project_view_state', $t_default_bugnote_view_status );
echo get_enum_element( 'view_state', $t_default_bugnote_view_status );
}
?>
</td>
Expand Down
2 changes: 1 addition & 1 deletion bug_change_status_page.php
Expand Up @@ -355,7 +355,7 @@
<label class="lbl padding-6" for="bugnote_add_view_status"><?php echo lang_get( 'private' ) ?></label>
<?php
} else {
echo get_enum_element( 'project_view_state', $t_default_bugnote_view_status );
echo get_enum_element( 'view_state', $t_default_bugnote_view_status );
}
?>
</td>
Expand Down
2 changes: 1 addition & 1 deletion manage_proj_create_page.php
Expand Up @@ -146,7 +146,7 @@
</td>
<td>
<select id="project-view-state" name="view_state" class="input-sm">
<?php print_enum_string_option_list( 'view_state', config_get( 'default_project_view_status', null, ALL_USERS, ALL_PROJECTS ) ) ?>
<?php print_enum_string_option_list( 'project_view_state', config_get( 'default_project_view_status', null, ALL_USERS, ALL_PROJECTS ) ) ?>
</select>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion manage_proj_edit_page.php
Expand Up @@ -158,7 +158,7 @@
</td>
<td>
<select id="project-view-state" name="view_state" class="input-sm">
<?php print_enum_string_option_list( 'view_state', (int)$t_row['view_state']) ?>
<?php print_enum_string_option_list( 'project_view_state', (int)$t_row['view_state']) ?>
</select>
</td>
</tr>
Expand Down

0 comments on commit 25eec2c

Please sign in to comment.