Skip to content

Commit

Permalink
Fixed #3108: No custom fields are shown in the details, if you are in…
Browse files Browse the repository at this point in the history
… "All

Projects"

M bug_update.php
- The custom fields update was only working if the current project is equal to the bug project.

M bug_view_advanced_page.php
M bug_view_page.php
M print_bug_page.php
- Custom fields of the current project were displayed rather than the ones
belonging to the current bug.  Hence, in case of "All Projects", no custom
fields were displayed.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2141 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Apr 4, 2003
1 parent fa4c3b1 commit d580a86
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bug_update.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_update.php,v 1.56 2003-03-05 11:51:15 vboctor Exp $
# $Id: bug_update.php,v 1.57 2003-04-04 00:02:58 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -65,7 +65,7 @@
# Update the bug entry
bug_update( $f_bug_id, $t_bug_data, true );

$t_related_custom_field_ids = custom_field_get_linked_ids( helper_get_current_project() );
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id );
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, $f_bug_id ) ) {
Expand Down
4 changes: 2 additions & 2 deletions bug_view_advanced_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_view_advanced_page.php,v 1.46 2003-03-27 22:34:03 int2str Exp $
# $Id: bug_view_advanced_page.php,v 1.47 2003-04-04 00:02:59 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -365,7 +365,7 @@
<!-- Custom Fields -->
<?php
$t_custom_fields_found = false;
$t_related_custom_field_ids = custom_field_get_linked_ids( helper_get_current_project() );
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
if ( !custom_field_has_read_access( $t_id, $f_bug_id ) ) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions bug_view_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_view_page.php,v 1.47 2003-03-27 22:34:04 int2str Exp $
# $Id: bug_view_page.php,v 1.48 2003-04-04 00:02:59 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -279,7 +279,7 @@
<!-- Custom Fields -->
<?php
$t_custom_fields_found = false;
$t_related_custom_field_ids = custom_field_get_linked_ids( helper_get_current_project() );
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
if( !$t_def['advanced'] && custom_field_has_read_access( $t_id, $f_bug_id ) ) {
$t_def = custom_field_get_definition( $t_id );
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -9,6 +9,7 @@ Mantis ChangeLog
* Fix #3080: project menu bar shows extra links
* Fix #3089: Hide link to Profiles management on account page based on access level.
* Fix #3092: Problem changing printing prefs.
* Fix #3108: No custom fields are shown in the details, if you are in "All Projects"
* Languages: Updated Italian and Dutch localisations.
* Languages: Synchronised localisation files with English localisation.

Expand Down
2 changes: 1 addition & 1 deletion print_bug_page.php
Expand Up @@ -222,7 +222,7 @@
</tr>

<?php
$t_related_custom_field_ids = custom_field_get_linked_ids( helper_get_current_project() );
$t_related_custom_field_ids = custom_field_get_linked_ids( $v_project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
$t_def = custom_field_get_definition( $t_id );
?>
Expand Down

0 comments on commit d580a86

Please sign in to comment.