View Issue Details

IDProjectCategoryView StatusLast Update
0010873mantisbtroadmappublic2015-05-18 11:21
Reporterandy_mbt Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.15 
Target Version1.2.16Fixed in Version1.2.16 
Summary0010873: Change Log/Roadmap do not work with inherited versions.
Description

Basically making an issue for: 0005668:0022460

When using the new version inheritance feature, issues are no longer populating the Change Log and Roadmap.

Steps To Reproduce
  • Create a project with a sub-project;
  • Add a version to the master project;
  • Have the sub-project inherit that version;
  • Resolve an issue in the sub-project using that version;
  • Check Change Log/Roadmap, they're empty.
TagsNo tags attached.

Relationships

related to 0005668 acknowledged "versions" of parent project should be used in subprojects. 
related to 0011402 closeddhx SYSTEM WARNING: in_array() [function.in-array]: Wrong datatype for second argument 
has duplicate 0011430 closeddhx The bug in the subproject is not in the roadmap 
has duplicate 0012189 closed Subprojects using Parent project versions don't have roadmaps 
has duplicate 0012769 closedatrol Change log does not list tickets from sub-projects 
has duplicate 0014392 closeddregad Change log pag is blank/empty after migration! 
has duplicate 0017732 closeddregad Change Log and Roadmap don't correctly propagate versions to sub-projects 
related to 0014637 acknowledged Roadmap should not display versions defined in parent siblings ( parent's have some common sub-projects ) 

Activities

Olaf123

Olaf123

2009-10-09 07:15

reporter   ~0023106

I have seen the same thing. I migrated my project from 1.2RC1 to 1.2RC2 and cleaned up the versions. Now the roadmap is gone. I will try to find out what is happening in detail.

neilc

neilc

2009-10-09 09:31

reporter   ~0023107

I have seen this in 1.2RC2 (The roadmap for a subproject does not include an inherited version). I looked at the code and found that this was a caching issue. After commenting out the cache check at the start of version_get_all_rows() (version_api.php) I attained the expected(?) behaviour.

Hope that helps anyone trying to fix it.

andy_mbt

andy_mbt

2009-11-07 10:53

reporter   ~0023613

I followed what you said neilc, unfortunately that only solved one of the two.

I can now see the Change Log but still can't see anything under Roadmap.

Any other ideas?

cor3huis

cor3huis

2010-01-05 15:53

reporter   ~0024052

When retesting this defect it is important to make sure you do not set the "Released" option to on, if release means, it will not be on the roadmap, since it is , ahum ...released.

dhx

dhx

2010-01-17 18:50

reporter   ~0024187

Can someone please retest this with the latest git checkout of 1.2.x or 1.3.x? neilc commented above about a caching issue that I should have hopefully fixed as part of 0011402

nimmich

nimmich

2010-01-25 06:13

reporter   ~0024241

Still doesn't work with nightly build as of 2010-01-22. A quick fix is to comment out the invocation of version_cache_array_rows() in roadmap_page.php and changelog_page.php. However, as neilc commented above, the main problem seems to be in core/version_api.php:version_get_all_rows() where very different things are done depending on whether versions are cached or not.

rerbin

rerbin

2010-01-25 08:09

reporter   ~0024243

Still doesn't work with nightly build as of 2010-01-25,see http://www.mantisbt.org/bugs/view.php?id=11430

mgysin

mgysin

2010-03-23 08:37

reporter   ~0024866

Last edited: 2010-03-23 08:37

View 2 revisions

Tested with the latest 1.2 nightly, roadmap is still empty for sub-project issue.
Can't find too the git commit, maybe someone can link it to me?

emkayIII

emkayIII

2010-03-24 15:34

reporter   ~0024902

I just tested this with 1.3.0dev-2010-03-24 and still a no go. Both the roadmap and the changelog do not show sub-project issues where the version is inherited from the parent project.

anthropic

anthropic

2010-07-12 04:41

reporter   ~0026054

Can the target version be changed to the next release which I assume will still be one of the 1.2.x versions?

micahg

micahg

2010-08-05 17:37

reporter   ~0026231

Replacing this issue with bug 0011802 since the other one has a patch attached.

micahg

micahg

2010-08-05 17:53

reporter   ~0026234

Apologies for the bug noise, was looking at the wrong bug.

neosonicxmantis

neosonicxmantis

2010-08-07 16:21

reporter   ~0026241

Solution?

1) If replace version_get_all_rows in roadmap_page.php,

SELECT versions.*
FROM bug_table
LEFT JOIN versions ON versions.version = bug_table.target_version
WHERE
bug_table.project_id = ?
AND bug_table.target_version <> ''
AND versions.obsolete = ?
GROUP BY bug_table.target_version
ORDER BY versions.date_order DESC

Requirements:

1.A) versions.version is unique index,
( Why bug_table.target_version is versions.version? Well, I think [A] is impossible, because copy paste versions feature. )

OR

1.B) New field: bug_table.target_version_id INT UNSIGNED
( LEFT JOIN versions ON versions.id = bug_table.target_version_id )

====== OR =======

2) Synchronize versions table

2.1) New field: versions.parent_id INT UNSIGNED NOT NULL DEFAULT 0

2.2) Inssue, On change target-version,
Synchronize versions table, adding or updating the version in sub-project.
SubprojectVersion.parent_id = ProjectVersion.id

2.3) Manage Project, list versions WHERE parent_id = 0

2.4) Manage Project, after edit version,
UPDATE versions SET version = ?, description = ?, ... WHERE parent_id = [this->id]

======
I'm using 1.A, because my projects doesn't have same version name.

Foo project - Foo1.0
Foo project - Foo2.0
Foo subproject
Bar project - Bar1.0
Bar project - Bar2.0
Bar subproject

neosonicxmantis

neosonicxmantis

2010-08-07 16:41

reporter   ~0026242

Solution 3: disable get versions from cache

/core/version_api.php
function version_get_all_rows( $p_project_id, $p_released = null, $p_obsolete = false, $p_inherit = null ) {
// global $g_cache_versions, $g_cache_versions_project;
...

It solves, i.e., we have a problem in caching results.

co

co

2010-08-09 03:18

reporter   ~0026245

Last edited: 2010-08-09 03:18

View 2 revisions

@neosonicxmantis (aka hero): Solution 3 works fine with 1.2.0 as well. many thanks!

micahg

micahg

2010-08-09 20:24

reporter   ~0026260

Confirmed that solution 3 displays the information. I think it should be grouped by milestone though rather than by project/subproject, but I'm happy to open another bug for that.

dregad

dregad

2010-09-08 08:34

developer   ~0026622

Last edited: 2010-09-21 08:13

View 2 revisions

Solution 3 outlined in 0010873:0026242 worked great for me, on 1.2.1. Thanks for the suggestion !

Update: this fix causes bugs to be displayed twice when displaying the roadmap for a child project (one for the parent, and one for the child). When displaying the roadmap for the parent, the same behavior can be observed, for each of the child projects (i.e. parent has one bug list per upcoming version, and each child has 2)

Example: Assuming parent project "P" has child project "C", and C is set to inherit versions from P, the Roadmap for C looks like this:

C - Roadmap

C - 2.1 (Scheduled For Release 2011-01-10)

(list of issues for C in release 2.1)

P - 2.1 (Scheduled For Release 2011-01-10)

(list of issues, identical to above)

papaya

papaya

2010-12-16 15:09

reporter   ~0027622

Are there any news on that issue? Is that somehow scheduled or is someone already working on that?

eelcodegraaff

eelcodegraaff

2011-02-03 13:18

reporter   ~0028154

I have the same problem with 1.2.4 does someone know if it is fixed? Roadmapping and change log works fine when you have no subprojects. Since we have a lot of products and new development activity's i would like to use sub projects.

gma

gma

2011-03-09 10:50

reporter   ~0028392

The proposed solution that the caching for the getting the projects associated with the version worked for me also, I didn't understand why the child projects are not added in cache for a specific version, I'll investigate this.

Here is the quick fix:

Solution 3: disable get versions from cache

/core/version_api.php
function version_get_all_rows( $p_project_id, $p_released = null, $p_obsolete = false, $p_inherit = null ) {
global $g_cache_versions, $g_cache_versions_project;

/*if( isset( $g_cache_versions_project[ (int)$p_project_id ] ) ) {
    if( !empty( $g_cache_versions_project[ (int)$p_project_id ]) ) {
        foreach( $g_cache_versions_project[ (int)$p_project_id ] as $t_id ) {
            $t_versions[] = version_cache_row( $t_id );
        }
        return $t_versions;
    } else {
        return array();
    }
}*/
mark.badolato

mark.badolato

2011-03-11 13:56

reporter   ~0028405

Confirmed that the quick fix in 0010873:0028392 fixes the display for me

neilc

neilc

2011-03-14 04:43

reporter   ~0028413

Even though this is more a workaround than fixing the actual caching problem, can the commenting out fix be put in the next 1.2.x release? It's a pain having to remember to re-implement this and is a fairly major bug for those of us using subprojects!

(Maybe this bug could be resolved and a new one created for fixing the caching?)

cor3huis

cor3huis

2011-04-09 09:25

reporter   ~0028578

Goal: A roadmap page which also shows the roadmap of sub-projects on the page

I did test it on version 1.2.5 Git of 20110408 an the roadmap worked for sub-projects, Great!

I had:

PROJ_A
SUBROJ_X

PROJ_B
SUBROJ_X

Make sure you have:

  • A project with versions
  • Issues in the tracker that are not resolved
  • A Target Version set in every issue
  • A Viewable Project

One of the main thin to keep in mind that a roadmap is a Project bound to Version and Deliverydate. If one has no target version set it will an cannot show in the roadmap ofcourse.

If somethisn does not work since you upgraded from older versions then thes things might help:

  • Subproject inheritance

    Click button: Update subproject inheritance

    Then it does work, fine you are done!.

*Unlink

Unlink everythin first, set your version, then relink the sub-project
press [Unlink ]

Select all

update target version of a version in the dropdown

Now make it a sub-project again

...it works, than good. If id dioes not make sure you understand mantis and roadmap concept well, and try again with a new Project and subproject.

Notes:

Ensure you have set the config "$g_roadmap_view_threshold" to something good (e.g. VIEWER)

Hauptmann

Hauptmann

2011-08-17 11:24

reporter   ~0029494

it does not work in our installation.

We today installed 1.2.6.

On project A I defined a version "test". I created a subproject B and connected it to A (including inheritance). Finally I created an issue under B and fixed in the inherited version "test" (also setting the target version).
The version shows at the issue but the roadmap and changelog are staying empty.

In another project we have no subprojects and are using versions; here, I can view the roadmap and changelog as in this site.

There is still something wrong...

C4Vette

C4Vette

2011-08-25 07:30

reporter   ~0029559

Solution 3 works fine for 1.2.7 as well.

Thanks

andy778

andy778

2011-09-01 10:35

reporter   ~0029612

This would be good to fix in next 1.2.x relase also

jacky.alcine

jacky.alcine

2012-01-24 07:22

reporter   ~0031018

Still an issue in my tracker (1.2.8).

A fix was mentioned in http://www.mantisbt.org/bugs/view.php?id=10873#c26622 but then http://www.mantisbt.org/bugs/view.php?id=10873#c26622 occurred. Why not, then hold a list of all mentioned bug IDs on the page in a cache?

I'll see if I can make a patch to the master branch today.

esutton

esutton

2012-08-23 09:26

reporter   ~0032628

Solution 3 was a great improvement for my users on 1.2.10 as well.

My only problem is the road map displaying versions from a parent's sibling when the other parent is selected before displaying road map. I created issue 0014637 for this.

dtgriscom

dtgriscom

2013-02-14 10:54

reporter   ~0035141

I, too, would love to see a fix for this. I'm just getting into doing target versions and roadmaps, and this bug makes having a project hierarchy break my roadmaps completely.

If I'm looking at the roadmap for a parent project, and a version in the parent project is used as a target for an issue in a sub-project, then that sub-issue should appear in the roadmap. (Right? Is this controversial?)

esutton

esutton

2013-02-14 11:13

reporter   ~0035143

The scenario as described by dtgriscom I do not think is controversial. The "solution 3" fix provided by gma in one of the notes above provides a work-around to implement this feature.

I would enjoy seeing a solution in 1.3.x for the scenario described by dregad in issue 0014637 : "Roadmap should not display versions defined in parent siblings ( parent's have some common sub-projects )"

-Ed

mmmichael

mmmichael

2013-02-17 16:17

reporter   ~0035191

I have a very simple fix for this. Additional to 0010873:0028392 I added an simple skip logic for already shown bugs:

if(in_array($t_row['id'], $arDisplayedBugs) == true)
continue;

$arDisplayedBugs[] = $t_row['id'];

toddpw

toddpw

2013-03-20 02:19

reporter   ~0035920

I am upgrading from 1.2.6 to 1.2.14 tonight and transferring my local copy of "solution 3" as I found it necessary for the same reason as everyone else.

mmmichael, any chance you can provide a context diff so I can be sure I'm putting the code in exactly the right place? thx

peterbruin

peterbruin

2013-06-24 06:09

reporter   ~0037264

Root cause of all these problems relating to the road map is that the version is not properly stored in the bug_table. It is stored as a string and this makes it very difficult to find the real version. In my opinion it should be the version id. Is there anyway to run an automated upgrade script?

Example when this is a problem. I have project A with sub project B, both have a version 0.1, then the bug will be assigned to project A 0.1 but will also show up in project B 0.1

It seems that the whole idea of version inheritance is a bit flawed, I can not imagine a proper usage. Either you have all versions defined in the parent or all version per project, a mixture seems a recipe for disaster.

dregad

dregad

2013-06-24 07:23

developer   ~0037265

I agree with you that how we currently deal with versions and inheritance is clunky (at best).

However, refactoring this is no small undertaking, and an automated upgrade script would be quite complex and is highly likely to encounter issues trying to determine which issue id to use, especially in the cases where we have multiple versions with the same name, combined with the notion of inheritance.

peterbruin

peterbruin

2013-06-24 22:06

reporter   ~0037271

I have submitted a fix to github that leaves the caching mechanism intact.

https://github.com/uncletall/mantisbt/commit/5d79b2785f9bd472d1da84d0e26950b3f98639d9

dregad

dregad

2013-06-26 02:16

developer   ~0037302

Thanks for the pull request, I will have a look as time allows

dregad

dregad

2013-10-21 17:53

developer   ~0038322

Thanks for your patch Peter, I've merged it in.

Related Changesets

MantisBT: master-1.2.x 11cc5daf

2013-06-24 21:58:31

peterbruin


Committer: dregad Details Diff
(issue 0010873) Fixes missing version on roadmap

Bugs with a target version that is inherited from a parent project
are not shown on the roadmap.
This fixes this and leaves the caching feature intact.
Affected Issues
0010873
mod - core/version_api.php Diff File

MantisBT: master fa979d8a

2013-09-29 17:33:27

dregad

Details Diff
Fix 0010873: version inheritance in roadmap and changelog

Bugs with a target version that is inherited from a parent project
are not shown on the roadmap.
This fixes this and leaves the caching feature intact.

Many thanks to Peter Bruin for providing a fix for this long-standing
issue.
Affected Issues
0010873
mod - core/version_api.php Diff File
mod - library/adodb Diff File

MantisBT: master-1.2.x 88045cf0

2013-10-21 17:43:49

dregad

Details Diff
Fix 0010873: version inheritance in roadmap and changelog

Many thanks to Peter Bruin for providing a fix for this long-standing
issue.
Affected Issues
0010873
mod - core/version_api.php Diff File

Issue History

Date Modified Username Field Change
2009-08-25 10:25 andy_mbt New Issue
2009-10-09 07:15 Olaf123 Note Added: 0023106
2009-10-09 09:31 neilc Note Added: 0023107
2009-11-07 10:53 andy_mbt Note Added: 0023613
2009-11-07 12:23 jreese Priority urgent => normal
2009-11-07 12:23 jreese Severity block => major
2009-11-07 12:23 jreese Status new => acknowledged
2009-11-07 12:23 jreese Target Version => 1.2.2
2010-01-02 00:56 vboctor Relationship added related to 0005668
2010-01-02 00:56 vboctor Target Version 1.2.2 => 1.3.0-beta.1
2010-01-05 15:53 cor3huis Note Added: 0024052
2010-01-17 18:49 dhx Relationship added related to 0011402
2010-01-17 18:50 dhx Note Added: 0024187
2010-01-25 06:13 nimmich Note Added: 0024241
2010-01-25 08:09 rerbin Note Added: 0024243
2010-01-25 08:22 dhx Relationship added has duplicate 0011430
2010-03-23 08:37 mgysin Note Added: 0024866
2010-03-23 08:37 mgysin Note Edited: 0024866 View Revisions
2010-03-24 15:34 emkayIII Note Added: 0024902
2010-07-12 04:41 anthropic Note Added: 0026054
2010-08-05 17:28 micahg Relationship added has duplicate 0011802
2010-08-05 17:37 micahg Note Added: 0026231
2010-08-05 17:37 micahg Status acknowledged => resolved
2010-08-05 17:37 micahg Resolution open => duplicate
2010-08-05 17:52 micahg Relationship deleted has duplicate 0011802
2010-08-05 17:53 micahg Note Added: 0026234
2010-08-05 17:53 micahg Status resolved => acknowledged
2010-08-05 17:53 micahg Resolution duplicate => open
2010-08-05 17:54 micahg Relationship added has duplicate 0012189
2010-08-07 16:21 neosonicxmantis Note Added: 0026241
2010-08-07 16:41 neosonicxmantis Note Added: 0026242
2010-08-09 03:18 co Note Added: 0026245
2010-08-09 03:18 co Note Edited: 0026245 View Revisions
2010-08-09 20:24 micahg Note Added: 0026260
2010-09-08 08:34 dregad Note Added: 0026622
2010-09-21 08:13 dregad Note Edited: 0026622 View Revisions
2010-12-16 15:09 papaya Note Added: 0027622
2011-02-03 13:18 eelcodegraaff Note Added: 0028154
2011-02-28 14:36 atrol Relationship added has duplicate 0012769
2011-03-09 10:50 gma Note Added: 0028392
2011-03-11 13:56 mark.badolato Note Added: 0028405
2011-03-14 04:43 neilc Note Added: 0028413
2011-04-07 10:31 cor3huis Sponsorship Added cor3huis: US$ 25
2011-04-07 10:31 cor3huis Sponsorship Total 0 => 25
2011-04-09 09:25 cor3huis Note Added: 0028578
2011-08-17 11:24 Hauptmann Note Added: 0029494
2011-08-25 07:30 C4Vette Note Added: 0029559
2011-09-01 10:35 andy778 Note Added: 0029612
2012-01-24 07:22 jacky.alcine Note Added: 0031018
2012-06-15 08:12 dregad Relationship added has duplicate 0014392
2012-08-23 09:26 esutton Note Added: 0032628
2012-08-23 09:57 dregad Relationship added related to 0014637
2013-02-14 10:54 dtgriscom Note Added: 0035141
2013-02-14 11:13 esutton Note Added: 0035143
2013-02-17 16:17 mmmichael Note Added: 0035191
2013-03-20 02:19 toddpw Note Added: 0035920
2013-06-24 06:09 peterbruin Note Added: 0037264
2013-06-24 07:23 dregad Note Added: 0037265
2013-06-24 22:06 peterbruin Note Added: 0037271
2013-06-26 02:16 dregad Note Added: 0037302
2013-10-18 20:43 atrol Product Version git trunk => 1.2.15
2013-10-21 17:51 dregad Changeset attached => MantisBT master-1.2.x 11cc5daf
2013-10-21 17:51 dregad Changeset attached => MantisBT master-1.2.x 88045cf0
2013-10-21 17:51 dregad Assigned To => dregad
2013-10-21 17:51 dregad Status acknowledged => resolved
2013-10-21 17:51 dregad Resolution open => fixed
2013-10-21 17:51 dregad Fixed in Version => 1.2.16
2013-10-21 17:52 dregad Changeset attached => MantisBT master fa979d8a
2013-10-21 17:53 dregad Note Added: 0038322
2013-10-21 17:53 dregad Target Version 1.3.0-beta.1 => 1.2.16
2014-02-07 18:24 dregad Status resolved => closed
2014-10-07 19:47 dregad Relationship added has duplicate 0017732