Issue information
-
#035681
-
Confirmed - General
-
-
-
-
-
0 - None Assigned
Issue Confirmations
-
Yes (0)No (0)
Currently, there are access checks for 'Locked' and 'Staff Only' access types for project versions, which prevent versions from appearing in dropdowns where they shouldn't. However, these access checks are not taking into account the fact that if an issue is edited, it should always include the currently selected version in the dropdown, otherwise a previously set version can be wiped out if a user edits an issue which is set to a version they normally can't access.
I believe the attached patch accomplishes what's needed:
I believe the attached patch accomplishes what's needed:
diff --git a/admin/applications_addon/ips/tracker/modules/versions/fields_public/version.php b/admin/applications_addon/ips/tracker/modules/versions/fields_public/version.php
index 7f706e8..6f978a9 100644
--- a/admin/applications_addon/ips/tracker/modules/versions/fields_public/version.php
+++ b/admin/applications_addon/ips/tracker/modules/versions/fields_public/version.php
@@ -348,14 +348,16 @@ class public_tracker_module_versions_field_version extends iptCommand implements
continue;
}
- if ( $single && ! ( $selected == $data['version_id'] ) )
+ if (! ( $selected == $data['version_id'] ) )
{
- continue;
- }
-
- if ( $data['permissions'] == 'locked' || ( $data['permissions'] == 'staff' && ! $this->checkPermission('developer') ) )
- {
- continue;
+ if ( $single )
+ {
+ continue;
+ }
+ if ( $data['permissions'] == 'locked' || ( $data['permissions'] == 'staff' && ! $this->checkPermission('developer') ) )
+ {
+ continue;
+ }
}
$data['version_id'] = isset( $data['version_id'] ) ? $data['version_id'] : 0;
0 user(s) are reading this issue
0 members, 0 guests, 0 anonymous users











