View Issue Details

IDProjectCategoryView StatusLast Update
0014842mantisbtbugtrackerpublic2014-09-23 18:05
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.9 
Target Version1.2.12Fixed in Version1.2.12 
Summary0014842: Incorrect matching of versions in print_version_option_list()
Description

When comparing versions to determine which ones to include in the select list, a loose comparison is performed (==), so '1' matches '1.0'.

This causes issues when editing a bug having a version currently obsolete, matching another, previously displayed version. In that case the obsolete version is not added to the selection list, causing data loss when the bug is saved (see 0013096).

Steps To Reproduce
  • In a project, define 2 versions as follows
    • '1', released
    • '1.0', released
  • report a bug against version '1'
  • set version '1' obsolete
  • edit bug

==> The current version '1' should be displayed but instead is set to blank

TagsNo tags attached.

Relationships

related to 0013096 closeddregad Spurious Target Version Behaviour. 
related to 0010192 closedjreese Repeated Target versions 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

dregad

dregad

2012-10-18 09:53

developer   ~0033265

Last edited: 2012-10-18 09:53

The in_array() introduced in 0010192 check should use strict comparison, to ensure that '1' and '1.0' are treated as different versions.

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036211

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 14560348

2012-10-18 02:54

dregad


Details Diff
Fix 0014842: Incorrect matching of versions in print_version_option_list

When comparing versions to determine which ones have already been added
to the select list, a loose comparison is performed, so '1' matches
'1.0'.

This causes issues when editing a bug having a version currently
obsolete matching another, previously displayed version. In that case
the obsolete version is not added to the selection list, causing data
loss when the bug is saved (see issue 0013096).
Affected Issues
0013096, 0014842
mod - core/print_api.php Diff File

MantisBT: master 62a24e93

2012-10-18 02:54

dregad


Details Diff
Fix 0014842: Incorrect matching of versions in print_version_option_list

When comparing versions to determine which ones have already been added
to the select list, a loose comparison is performed, so '1' matches
'1.0'.

This causes issues when editing a bug having a version currently
obsolete matching another, previously displayed version. In that case
the obsolete version is not added to the selection list, causing data
loss when the bug is saved (see issue 0013096).
Affected Issues
0013096, 0014842
mod - core/print_api.php Diff File