Merge pull request #664 from Icinga/fix/comments-cannot-be-deleted-663

Fix that some comments cannot be deleted
This commit is contained in:
Johannes Meyer 2022-11-02 12:37:00 +01:00 committed by GitHub
commit 620a4cceb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -11,6 +11,8 @@ use Icinga\Module\Icingadb\Common\TicketLinks;
use Icinga\Module\Icingadb\Model\Comment;
use Icinga\Module\Icingadb\Widget\MarkdownText;
use Icinga\Module\Icingadb\Forms\Command\Object\DeleteCommentForm;
use ipl\Stdlib\Filter;
use ipl\Web\Filter\QueryString;
use ipl\Web\Widget\HorizontalKeyValue;
use ipl\Web\Widget\StateBall;
use ipl\Web\Widget\TimeUntil;
@ -108,7 +110,7 @@ class CommentDetail extends BaseHtmlElement
}
$action = Links::commentsDelete();
$action->setParam('name', $this->comment->name);
$action->setQueryString(QueryString::render(Filter::equal('name', $this->comment->name)));
return (new DeleteCommentForm())
->setObjects([$this->comment])

View file

@ -54,7 +54,7 @@ class DowntimeDetail extends BaseHtmlElement
protected function createCancelDowntimeForm()
{
$action = Links::downtimesDelete();
$action->setParam('name', $this->downtime->name);
$action->setQueryString(QueryString::render(Filter::equal('name', $this->downtime->name)));
return (new DeleteDowntimeForm())
->setObjects([$this->downtime])