View Issue Details

IDProjectCategoryView StatusLast Update
0010411mantisbtbugtrackerpublic2018-10-05 17:01
ReporterpaontisAssigned Tovboctor 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.2.0a3 
Target Version2.18.0Fixed in Version2.18.0 
Summary0010411: Changes to project_view_state and view_state to create only private projects
Description

I needed to create only private projects and forbid to create public projects.
I saw in config_defaults_inc.php the following:
$g_project_view_state_enum_string = '10:public,50:private';
So in config_inc.php i put:
$g_project_view_state_enum_string = '50:private';

However in the code sometime it is used view_state where I expected to find project_view_state and viceversa.
So i did the following changes:

In manage_proj_create_page.php i changed:
<?php print_enum_string_option_list( 'view_state' ) ?>
to:
<?php print_enum_string_option_list( 'project_view_state' ) ?>

In manage_proj_edit_page.php i changed:
<?php print_enum_string_option_list( 'view_state', $row['view_state']) ?>
to:
<?php print_enum_string_option_list( 'project_view_state', $row['view_state']) ?>

In manage_proj_page.php i changed:
<?php echo get_enum_element( 'view_state', $t_project['view_state'] ) ?>
to:
<?php echo get_enum_element( 'project_view_state', $t_project['view_state'] ) ?>

And, viceversa, in bug_view_page.php and bug_view_advanced_page.php i changed:
<?php echo get_enum_element( 'project_view_state', $t_bug->view_state ) ?>
to:
<?php echo get_enum_element( 'view_state', $t_bug->view_state ) ?>

TagsNo tags attached.

Relationships

related to 0016554 closeddregad Project privacy change from public to to private kicks manager out 
related to 0003874 closedvboctor default view state for projects 

Activities

paontis

paontis

2009-05-18 09:18

reporter   ~0021831

the same for bug_view_inc.php (included for example in the page bug_reminder_page.php):
change
<?php echo get_enum_element( 'project_view_state', $t_bug->view_state ) ?>
to
<?php echo get_enum_element( 'view_state', $t_bug->view_state ) ?>

vboctor

vboctor

2018-09-30 17:41

manager   ~0060715

PR: https://github.com/mantisbt/mantisbt/pull/1392

Related Changesets

MantisBT: master 25eec2cf

2018-09-30 17:40:33

vboctor


Committer: atrol Details Diff
Fix view state references

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 0010411
Affected Issues
0010411
mod - bug_actiongroup_page.php Diff File
mod - bug_change_status_page.php Diff File
mod - manage_proj_create_page.php Diff File
mod - manage_proj_edit_page.php Diff File

Issue History

Date Modified Username Field Change
2009-04-27 05:37 paontis New Issue
2009-05-18 09:18 paontis Note Added: 0021831
2013-11-02 08:19 atrol Relationship added related to 0016554
2014-06-02 06:13 atrol Relationship added related to 0003874
2014-06-10 04:11 vboctor Assigned To => vboctor
2014-06-10 04:11 vboctor Status new => assigned
2018-09-30 17:41 vboctor Note Added: 0060715
2018-10-05 17:00 atrol Changeset attached => MantisBT master 25eec2cf
2018-10-05 17:00 vboctor Status assigned => resolved
2018-10-05 17:00 vboctor Resolution open => fixed
2018-10-05 17:00 vboctor Fixed in Version => 2.18.0
2018-10-05 17:01 atrol Target Version => 2.18.0