View Issue Details

IDProjectCategoryView StatusLast Update
0019400mantisbtotherpublic2016-08-15 09:02
Reportermjt Assigned Torombert  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
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

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

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

reporter   ~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 00:42

rombert


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

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