New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix update ticket status when ticket task is de-scheduled #16895
base: main
Are you sure you want to change the base?
Fix update ticket status when ticket task is de-scheduled #16895
Conversation
Please add a test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a function updateParentStatus
, which you could use
|| $needupdateparent) | ||
) { | ||
$input['_status'] = CommonITILObject::PLANNED; | ||
} elseif ($parentitem->fields["status"] == CommonITILObject::PLANNED) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method may also be executed, for instance, from the ITILFollowup
context. In this case, the begin
field would not exist and a SQL error will probably be raised.
A test case should probably be added to ensure that adding a followup on a ticket that has the CommonITILObject::PLANNED
status will not fail.
Also, should the parent status be updated if the begin
filed was not changed ?
} elseif ($parentitem->fields["status"] == CommonITILObject::PLANNED) { | |
} elseif ( | |
$parentitem->fields["status"] == CommonITILObject::PLANNED | |
&& in_array('begin', $this->updates) | |
&& $this->isField('begin') | |
) { |
I change the target to main branch. This can be considered as a new feature and may have unexpected side effects. |
When a task is de-scheduled, the ticket status remains In progress (Scheduled) instead of being changed back to In progress (Assigned).