Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
10 Aug 2016

Pull Request for Issue #862 .

Summary of Changes

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.

Testing Instructions

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.

Question (Other way arround)

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;
avatar zero-24 zero-24 - open - 10 Aug 2016
avatar mbabker
mbabker - comment - 10 Aug 2016

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.

avatar zero-24
zero-24 - comment - 10 Aug 2016

so we go with this solution?

avatar zero-24
zero-24 - comment - 10 Aug 2016

In the submit controller?

avatar mbabker mbabker - close - 13 Aug 2016
avatar mbabker mbabker - merge - 13 Aug 2016
avatar mbabker mbabker - change - 13 Aug 2016
Status New Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-13 14:21:21
Closed_By mbabker

Add a Comment

Login with GitHub to post a comment