Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3b20a69
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 081ca28
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Feb 23, 2012

  1. Fix #13935: Version-based filtering not possible

    Commit a683982 for bug #13096
    introduced a regression in version-based filtering due to not properly
    dealing with selected version parameter when passed as an array.
    dregad committed Feb 23, 2012
    Copy the full SHA
    84c6fe6 View commit details
  2. Avoid error when editing bug with invalid version

    When editing an issue having the Product Version field set to a version
    number which is not defined in the issue's current project (which can
    happen when the issue has been moved from another project, or a version
    has been deleted from the current project), APPLICATION ERROR 1601 -
    Version "" not found occurs.
    
    The error occurs because the version field in the bug table is not
    cleared when the issue is moved, so when Mantis is building the version
    selection list to edit the bug, it tries to add the version defined in
    it to the list, which triggers the error since that version does not
    exist in the current project.
    
    Regression caused by commit a683982
    
    Fixes #13938
    dregad committed Feb 23, 2012
    2
    Copy the full SHA
    081ca28 View commit details
Showing with 9 additions and 3 deletions.
  1. +9 −3 core/print_api.php
12 changes: 9 additions & 3 deletions core/print_api.php
Original file line number Diff line number Diff line change
@@ -764,9 +764,15 @@ function print_version_option_list( $p_version = '', $p_project_id = null, $p_re
null );
}

# Ensure the current version (if specified) is included in the list
if( !empty( $p_version ) ) {
$versions[] = version_cache_row( version_get_id( $p_version, $c_project_id ) );
# Ensure the selected version (if specified) is included in the list
# Note: Filter API specifies selected versions as an array
if( !is_array( $p_version ) ) {
if( !empty( $p_version ) ) {
$t_version_id = version_get_id( $p_version, $c_project_id );
if( $t_version_id !== false ) {
$versions[] = version_cache_row( t_version_id );
}
}
}

if( $p_leading_blank ) {