View Issue Details

IDProjectCategoryView StatusLast Update
0012261mantisbtfilterspublic2019-03-16 20:20
ReporterEisbaer Assigned Tocproensa  
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

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.


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 




2011-11-14 04:51

reporter   ~0030229

Last edited: 2012-05-31 08:44

View 2 revisions

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

// $t_project_where = helper_project_specific_where( $p_project_id );
$t_project_where = version_get_project_where_clause( $p_project_id, / inherit = / null );

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



2012-01-11 18:19

reporter   ~0030895

Duplicate of 0005668 ?



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?



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.



2013-09-23 09:34

developer   ~0038098

patches are also welcome ;-)



2013-09-23 10:02

reporter   ~0038099

Look at 0005668:0037046



2014-08-23 08:52

reporter   ~0041115

Last edited: 2014-08-23 08:53

View 2 revisions

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



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 ) .')';



2015-05-18 11:05

reporter   ~0050780

Thanks masud, your patch is beter than this



2017-02-15 10:34

reporter   ~0055698

Thanks @masud,

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



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>

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

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

Related Changesets

MantisBT: master a9cd4cf6

2019-02-13 18:32:08


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
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

Issue History

Date Modified Username Field Change
2010-08-16 07:30 Eisbaer New Issue
2011-11-14 04:51 jean-marc.raffolt Note Added: 0030229
2012-01-11 18:19 fuscata Note Added: 0030895
2012-01-12 05:57 dregad Relationship added related to 0005668
2012-05-31 08:44 jean-marc.raffolt Note Edited: 0030229 View Revisions
2013-02-22 05:26 dregad Relationship added has duplicate 0015531
2013-02-28 13:35 po Note Added: 0035331
2013-09-23 09:30 mschopman Note Added: 0038096
2013-09-23 09:34 dregad Note Added: 0038098
2013-09-23 10:02 po Note Added: 0038099
2014-08-23 08:52 hippyjim Note Added: 0041115
2014-08-23 08:53 hippyjim Note Edited: 0041115 View Revisions
2015-04-27 09:04 masud Note Added: 0050633
2015-05-18 11:05 artiflo Note Added: 0050780
2017-02-15 09:56 atrol Relationship added has duplicate 0022384
2017-02-15 10:34 mcmo Note Added: 0055698
2018-02-09 11:47 fman Note Added: 0058810
2019-02-14 06:02 cproensa Assigned To => cproensa
2019-02-14 06:02 cproensa Status new => assigned
2019-02-24 16:41 vboctor Changeset attached => MantisBT master a9cd4cf6
2019-02-24 16:41 cproensa Status assigned => resolved
2019-02-24 16:41 cproensa Resolution open => fixed
2019-02-24 16:41 cproensa Fixed in Version => 2.20.0
2019-02-24 16:43 vboctor Target Version => 2.20.0
2019-03-16 20:20 vboctor Status resolved => closed