View Issue Details

IDProjectCategoryView StatusLast Update
0012261mantisbtfilterspublic2019-03-16 20:20
ReporterEisbaer Assigned Tocproensa  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.1 
Target Version2.20.0Fixed in Version2.20.0 
Summary0012261: Cannot filter by versions of parent project when child project selected
Description

In Mantis I can define "versions" in a project A.
These versions are inherited by subprojects of A and shown on the manage project pages of the subprojects with the prefix "[A]".

But on the "View Issues" page, when having selected a subproject B of A, the comboboxes "Target Version", "Fixed in Version" and "Product Version" do not(!) contain these versions. Thus filtering is not possible.

Steps To Reproduce

Define Project A.
Define a Version "Version 1.0.0" in Project A.

Define Project B as a subproject auf A.
Select Project B and update an issue of project B to have "Targed Version" = "[A] Version 1.0.0".
Goto "View Issues", still having project B selected and try to filter by "Target Version", "Fixed in Version" or "Product Version".
=> The version is not shown. Filtering not possible.

Additional Information

Filtering is only possible, when project A is selected.
This can be used as a work-around, if filtering for subproject + version at the same time is not needed.

TagsNo tags attached.

Relationships

related to 0005668 acknowledged "versions" of parent project should be used in subprojects. 
has duplicate 0015531 closeddregad cannot filter by inherited versions 
has duplicate 0022384 closedatrol Missing versions in sub-projects when filtering the view of all issues 

Activities

jean-marc.raffolt

jean-marc.raffolt

2011-11-14 04:51

reporter   ~0030229

Last edited: 2012-05-31 08:44

I have the same problem with MantisBT 1.2.8

I am not a specialist but I mmade a change in function "version_get_all_rows_with_subs" file "version_api.php".

the list is correct in the sub-projects, but not quite in the project

//PERSO-MIN-DEBUT
// $t_project_where = helper_project_specific_where( $p_project_id );
$t_project_where = version_get_project_where_clause( $p_project_id, / inherit = / null );
//PERSO-MIN-FIN

31/05/2012 : Sorry but this change does not work !

fuscata

fuscata

2012-01-11 18:19

reporter   ~0030895

Duplicate of 0005668 ?

po

po

2013-02-28 13:35

reporter   ~0035331

Absolutely it isn't a duplicate of 0005668. The 0005668 issue is currently almost resolved, but it doesn't touch the filtering problem.

Will this issue be resolved in 1.2.x release?

mschopman

mschopman

2013-09-23 09:30

reporter   ~0038096

My vote +1 on this issue and a request to give this issue more priority.

I have just upgraded from 1.6.6 to 1.2.15 just for inheritance of categories and versions and noticed filtering is not possible on inherited versions. That is an essential and primary product functionality when the system allows the use of inheritance.

Any workaround, besides copying all versions back to all projects, is welcome.

dregad

dregad

2013-09-23 09:34

developer   ~0038098

patches are also welcome ;-)

po

po

2013-09-23 10:02

reporter   ~0038099

Look at 0005668:0037046

hippyjim

hippyjim

2014-08-23 08:52

reporter   ~0041115

Last edited: 2014-08-23 08:53

Any news on this? Patches referenced don't do anything.

masud

masud

2015-04-27 09:04

reporter   ~0050633

Maybe simple workaround is this:
in function version_get_all_rows_with_subs in file version_api.php after line
$t_project_where = helper_project_specific_where( $p_project_id );

add this line (parent projects):

$t_project_where = '('. $t_project_where .' or '. version_get_project_where_clause( $p_project_id, null ) .')';

artiflo

artiflo

2015-05-18 11:05

reporter   ~0050780

Thanks masud, your patch is beter than this https://www.mantisbt.org/bugs/view.php?id=5668#c37046

mcmo

mcmo

2017-02-15 10:34

reporter   ~0055698

Thanks @masud,

I have applied this successfully to v 2.2.0-devmaster-e40a285

fman

fman

2018-02-09 11:47

reporter   ~0058810

I've found same issue on 2.10.0 and 2.11.0
Solution for me is:

do change on function <b>print_filter_show_version() on filter_form_api.php</b>

FROM
<?php print_version_option_list( $p_filter[FILTER_PROPERTY_VERSION], null, VERSION_ALL, false, true )?>

TO (JUST REMOVE true)
<?php print_version_option_list( $p_filter[FILTER_PROPERTY_VERSION], null, VERSION_ALL, false)?>

Related Changesets

MantisBT: master a9cd4cf6

2019-02-13 13:32

cproensa

Committer: vboctor


Details Diff
Evaluate versions for multiple projects

- Make `version_get_all_rows()` evaluate mutiple projects, when we want to
get all versions provided by a group of projects. Including parent
projects if version inheritance is enabled.

- Make `version_should_show_product_version()` evaluate multiple
projects, as this conditions is needed in a context for several
projects. Eg: filters, bug-action-group, ...

- Make `print_version_option_list()` evaluate multiple projects. And
remove the functionality for including version from subprojects.

- Including subproject versions in `print_version_option_list()` is now
a task for the caller, by passing the exact list of projects for which
versions are needed. This project list is managed directly by the
filter_api and the filter specific logic.

Fixes: 0012261
Affected Issues
0012261
mod - bug_actiongroup_page.php Diff File
mod - core/filter_form_api.php Diff File
mod - core/print_api.php Diff File
mod - core/version_api.php Diff File