User tests: Successful: Unsuccessful:
Pull Request for Issue #862 .
In the submit controler we call the save method wihout the indexes new_state
and old_state
while this is expected the save method try to check on that field so we should fake it here.
Sumbit a item via the Tracker.
Check the logs
Undefined index: new_state in src/App/Tracker/Model/IssueModel.php on line 503
Undefined index: old_state in src/App/Tracker/Model/IssueModel.php on line 504
test againg with the patch.
Maybe we should move the check to the model?
so we have here: https://github.com/joomla/jissues/blob/master/src/App/Tracker/Model/IssueModel.php#L503-L504 something like:
// Assume open if nothing is set
$src['old_state'] = isset($src['old_state']) ? $src['old_state'] : 'open';
$state = isset($src['new_state']) ? $src['new_state'] : 'open';
$changedState = $src['old_state'] != $state;
so we go with this solution?
In the submit controller?
Status | New | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-13 14:21:21 |
Closed_By | ⇒ | mbabker |
Personally I'd? the idea on the model as it seems like a bad idea for the model to potentially change the record's state if something gets injected into it and is missing data.