View Issue Details

IDProjectCategoryView StatusLast Update
0019978mantisbtfilterspublic2016-01-19 15:25
Reporteratrol Assigned Tocproensa  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.2 
Target Version1.3.0-rc.1Fixed in Version1.3.0-rc.1 
Summary0019978: Values not preserved on filter page
Description

Most of the values are not preserved when clicking the link to choose the value.
It seems at first sight that all enums are affected.

Steps To Reproduce

Goto "View Issues" page
Click "Status"
Select value "New"
Click "Apply filter"
Click again "Status"

Expected behavior: Status "New" is selected
Actual behavior: Status "[any|" is selected

TagsNo tags attached.

Activities

dregad

dregad

2015-08-02 17:22

developer   ~0051175

I can confirm this behavior.

I think this a blocking issue for 1.3 release.

cproensa

cproensa

2015-10-23 16:34

developer   ~0051689

tried a fix: https://github.com/mantisbt/mantisbt/pull/665

this bug happens on all fields that are enumerations: status, resolution, severity, priority... in simple and advanced filter modes.

Related Changesets

MantisBT: master b8dcb52a

2015-10-23 12:19

cproensa

Committer: dregad


Details Diff
print_enum_string_option_list() accepts array of values

This function was originally defined to accept an integer as current
value for the option list, so it gets defaulted. However, some places
(e.g. filter fields) were calling the function with this parameter set
as an array of one integer (or more, for multiselection option lists).

Changed parameter to accept array, since the check_selected() function
already accepts an array of values to check.

Adding a check for the case $p_val is a single value to cast it to an
int, because check_select() should be called in strict mode for enum
keys anyways, and some callers may still pass a number as string.

In the case of "array of int", the caller must ensure values are proper
int type.

Fixes 0019978

Reworded original commit message.

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Affected Issues
0019978
mod - core/print_api.php Diff File