View Issue Details

IDProjectCategoryView StatusLast Update
0019400mantisbtotherpublic2016-08-15 09:02
ReportermjtAssigned Torombert 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version 
Target Version1.2.20Fixed in Version1.2.20 
Summary0019400: core/bug_api.php, function create(): this_due_date
Description

Apparently there's a typo in function BugData::create(), here's the relevant code:

            # check due_date format
            if( is_blank( $this->due_date ) ) {
                    $this_due_date = date_get_null();
            }

It looks like $this_due_date is a typo which is supposed to be $this->due_date instead, because this is the only mention of this_due_date in whole codebase.

This code is here since the day one.

I've no idea what this changes functionality-wise.

TagsNo tags attached.

Activities

rombert

rombert

2015-02-26 05:02

developer   ~0048895

Yup, that's definitely a bug, introduced by https://github.com/mantisbt/mantisbt/commit/27213a20 .

It's a trivial fix, but maybe you'd like to submit a Github pull request yourself?

mjt

mjt

2015-02-26 05:21

reporter   ~0048896

Last edited: 2015-02-26 11:15

View 2 revisions

please just fix it. I don't really want to create another account on yet another site just to fix a typo...

BTW, the only reason I noticed this was because I was trying to find out what's going on with due_date field being reset at certain bug changes, so I was reading all the code where due_date is mentioned. The problem is that I don't really understand when this happens, I can't reproduce it on demand but it happens a lot here. Meanwhile I also found 0017977, but there's no mention what exactly was broken and the changes (f725b46954a514880792dd4be8228287756fac3d) are not related, so I don't really know if this changes anything... And there's no way for me to add a comment to that bug, eiter. Hwell ;)

EDIT dregad fix bug link

rombert

rombert

2015-02-26 05:39

developer   ~0048897

OK, I'll fix this myself, thanks for letting us know.

dregad

dregad

2015-02-26 11:20

developer   ~0048900

IIRC the fix in 0017977 resolved a regression introduced by the fix for a security issue (0017640), leading to incorrect handling of empty due dates.

mjt

mjt

2015-02-26 15:26

reporter   ~0048903

heh. That's almost exactly what 0017977 comment says, with one exception — addition of the word "empty". In my case (1.2.18 version), we see frequent reset of due_date from non-empty to empty when a user who does not have permissions to modify this field changes bug status and/or performs some other activity (I don't really know how to reproduce it). So far I applied the fix in 0017977, we'll see how it goes.

dregad

dregad

2015-02-26 15:37

developer   ~0048904

So far I applied the fix in 0017977, we'll see how it goes.

I would recommend to just upgrade to 1.2.19 rather than cherry-picking patches.

Related Changesets

MantisBT: master-1.2.x 884aebb7

2015-02-26 05:42:02

rombert

Details Diff
Fix 0019400: core/bug_api.php, function create(): this_due_date

Regression caused by 27213a20
mod - core/bug_api.php Diff File

Issue History

Date Modified Username Field Change
2015-02-26 04:57 mjt New Issue
2015-02-26 05:02 rombert Status new => confirmed
2015-02-26 05:02 rombert Note Added: 0048895
2015-02-26 05:03 rombert Target Version => 1.3.0-beta.2
2015-02-26 05:21 mjt Note Added: 0048896
2015-02-26 05:39 rombert Assigned To => rombert
2015-02-26 05:39 rombert Status confirmed => assigned
2015-02-26 05:39 rombert Note Added: 0048897
2015-02-26 05:42 rombert Target Version 1.3.0-beta.2 => 1.2.20
2015-02-26 05:43 rombert Changeset attached => MantisBT master-1.2.x 884aebb7
2015-02-26 05:43 rombert Status assigned => resolved
2015-02-26 05:43 rombert Resolution open => fixed
2015-02-26 05:43 rombert Fixed in Version => 1.2.20
2015-02-26 11:15 dregad Note Edited: 0048896 View Revisions
2015-02-26 11:20 dregad Note Added: 0048900
2015-02-26 15:26 mjt Note Added: 0048903
2015-02-26 15:37 dregad Note Added: 0048904
2015-03-02 08:03 vitsaadmin Issue cloned: 0019412
2016-08-15 09:02 dregad Status resolved => closed