diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 3fd43c63..4e8166ee 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -707,6 +707,7 @@ class Issue extends Controller $change->priority = $this->input->post('issue_change_priority'); $change->comment = $this->input->post('issue_change_comment'); + $old_state = NULL; if ($this->issues->change ($login['id'], $project, $issueid, $change, $is_nonmember, $old_state) === FALSE) { $status = 'error - ' . $this->issues->getErrorMessage(); @@ -714,8 +715,7 @@ class Issue extends Controller else { $status = 'ok'; - - if (CODEPOT_ISSUE_NOTIFICATION && $old_state->owner != $change->owner) + if (CODEPOT_ISSUE_NOTIFICATION && $old_state != NULL && $old_state->owner != $change->owner) { // TODO: message localization $email_subject = sprintf ( diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index 1b788a46..22587040 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -307,7 +307,6 @@ class IssueModel extends Model $old_state = $result[0]; if ($change->comment == '' || $disallow_state_change) { - if ($old_state->type == $change->type && $old_state->status == $change->status && $old_state->owner == $change->owner && @@ -328,6 +327,7 @@ class IssueModel extends Model } } } + else $old_state = NULL; $this->db->set ('projectid', $project->id); $this->db->set ('id', $id); diff --git a/codepot/src/codepot/views/issue_show.php b/codepot/src/codepot/views/issue_show.php index 35a907e0..fe33147d 100644 --- a/codepot/src/codepot/views/issue_show.php +++ b/codepot/src/codepot/views/issue_show.php @@ -995,7 +995,14 @@ function print_issue_state ($con, $issue, $old, $issue_type_array, $issue_status