View Issue Details

IDProjectCategoryView StatusLast Update
0031889mantisbtbugtrackerpublic2023-03-04 10:26
ReporterD.Schneider Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version2.20.0 
Target Version2.25.6Fixed in Version2.25.6 
Summary0031889: Product Version / Target Version - Date missing
Description

After updating to the latest Mantis version, the version date is no longer displayed (Product Version / Target Version)

I use the following setting:
$g_show_version_dates_threshold = VIEWER;

TagsNo tags attached.
Attached Files
image.png (11,617 bytes)   
image.png (11,617 bytes)   

Relationships

related to 0032086 closeddregad IssueViewPageCommand.php line 135: 'Undefined array key "version" with php 8.1.16 

Activities

atrol

atrol

2023-01-09 11:25

developer   ~0067280

Starting from 2.20.0, version dates are just displayed for released versions https://github.com/mantisbt/mantisbt/commit/8fbf719447ec72500b648ee440298811f8050bd7
Not sure, if this was a good idea.

@dregad @vboctor what do you think?

@D.Schneider I guess the date display is helpful for you especially when setting target version. Right?

dregad

dregad

2023-01-09 12:02

developer   ~0067281

@atrol The PHPDoc for $g_show_version_dates_threshold states:
The access level threshold at which users will see the date of release for product versions.

I can see why @cproensa may have interpreted "date of release" in that way, as by definition unreleased versions do not technically have an effective "release" date, even though they could (and often do) have a tentative/planned release date. So I think this change was wrong.

Considering that prepare_version_string() is only used within print_version_option_list(), I do not believe there are other considerations than the reported issue, and no risk to go back to pre-2.20 behavior.

Therefore I propose to partially revert MantisBT master 8fbf7194, keeping the version cache improvement but removing the test for version release state.

I can take care of the change and include it in upcoming 2.25.6 if you agree.

atrol

atrol

2023-01-09 15:29

developer   ~0067282

I can take care of the change and include it in upcoming 2.25.6 if you agree.

Fine from my side

dregad

dregad

2023-01-09 20:07

developer   ~0067283

PR https://github.com/mantisbt/mantisbt/pull/1865

D.Schneider

D.Schneider

2023-01-10 02:11

reporter   ~0067284

Last edited: 2023-01-10 02:11

@atrol Yes it is very useful to set the versions and also see when which bug fix/feature comes out

D.Schneider

D.Schneider

2023-01-10 02:29

reporter   ~0067285

Last edited: 2023-01-10 03:37

What about the issue page itself. I think the version dates were visible there before?

Reason why needed:
The ticket creators could see when a ticket is done and could let our customers know when the problem is solved.

image-2.png (11,870 bytes)   
image-2.png (11,870 bytes)   
dregad

dregad

2023-01-10 09:48

developer   ~0067286

Last edited: 2023-01-10 09:49

I think the version dates were visible there before?

You're right. Another regression (screenshot taken with release 2.19.1).

image-3.png (8,436 bytes)   
image-3.png (8,436 bytes)   
D.Schneider

D.Schneider

2023-01-10 10:15

reporter   ~0067287

Will this also be fixed?

dregad

dregad

2023-01-12 02:42

developer   ~0067289

Will this also be fixed?

It would make sense to fix it as well.

However, this is not the same root cause, and I'm afraid that it will not be as simple to fix.

dregad

dregad

2023-01-12 10:30

developer   ~0067292

The regression on Bug View Page started with introduction of IssueViewCommand in MantisBT master 2b163046

There are several possible ways to fix this, and I'm not sure which one would be best. I have asked @vboctor for advice, see PR for details.

@D.Schneider, do you see other places, where the version date is no longer displayed ?

D.Schneider

D.Schneider

2023-01-17 07:27

reporter   ~0067296

I think these were all places

dregad

dregad

2023-02-12 19:09

developer   ~0067383

Updated PR https://github.com/mantisbt/mantisbt/pull/1865 with fix for Bug View Page - @D.Schneider testing and feedback welcome.

Related Changesets

MantisBT: master 8fbf7194

2019-02-13 15:24

cproensa

Committer: vboctor


Details Diff
Only show dates for released versions

According to `show_version_dates_threshold` the date is displayed for
released versions.
Affected Issues
0031889
mod - core/prepare_api.php Diff File

MantisBT: master-2.25 be4708ce

2023-01-09 20:00

dregad


Details Diff
Add missing date for unreleased versions

Commit 8fbf719447ec72500b648ee440298811f8050bd7 stopped display of
unreleased versions' date_order when the user has
$g_show_version_dates_threshold.

This partially reverts to and improves previous behavior, so the date is
always shown unless it is not set.

Fixes 0031889
Affected Issues
0031889
mod - core/prepare_api.php Diff File

MantisBT: master-2.25 d9464fe8

2023-02-12 09:08

dregad


Details Diff
Restore missing version date on Bug View page

Fixing a regression introduced with IssueViewPageCommand, which removed
the prepare_version_string() calls and only displayed the version name,
as returned by the Command (see 2b163046849d3445894537f7a7b4762edd41ff8b).

The Command now returns the formatted version string in $t_issue_view
array.

Fixes 0031889
Affected Issues
0031889
mod - bug_view_inc.php Diff File
mod - core/commands/IssueViewPageCommand.php Diff File

MantisBT: master-2.25 6671bc5c

2023-03-01 11:41

dregad


Details Diff
Fix error when displaying Issue without Version

Commit d9464fe8132f6cfd694625c8d050575aed95d5ba introduced a regression
when displaying an Issue without Product, Target or Fixed In Version:

APPLICATION ERROR 1601 - Version "" not found
PHP Notice (or Warning on 8.1+): Undefined array key "version"

This is because mci_issue_data_as_array() removes null keys and empty
arrays from the Issue data, so the IssueViewPageCommand needs to check
for array key existence before calling prepared_version_string().

Fixes 0032086, 0031889
Affected Issues
0031889, 0032086
mod - core/commands/IssueViewPageCommand.php Diff File