diff --git a/Web/Presenters/BugtrackerPresenter.php b/Web/Presenters/BugtrackerPresenter.php
index 262f8041..2350629e 100644
--- a/Web/Presenters/BugtrackerPresenter.php
+++ b/Web/Presenters/BugtrackerPresenter.php
@@ -70,10 +70,15 @@ final class BugtrackerPresenter extends OpenVKPresenter
$status = $this->postParam("status");
$comment = $this->postParam("text");
+ $points = $this->postParam("points-count");
$list = ["Открыт", "На рассмотрении", "В работе", "Исправлен", "Закрыт", "Требует корректировки", "Заблокирован", "Отклонён"];
$report = (new BugtrackerReports)->get($report_id);
$report->setStatus($status);
+
+ if ($points)
+ DB::i()->getContext()->query("UPDATE `profiles` SET `coins` = `coins` + " . $points . " WHERE `id` = " . $report->getReporter()->getId());
+
$report->save();
$this->createComment($report, $comment, "Новый статус отчёта — $list[$status]", TRUE);
@@ -87,10 +92,15 @@ final class BugtrackerPresenter extends OpenVKPresenter
$priority = $this->postParam("priority");
$comment = $this->postParam("text");
+ $points = $this->postParam("points-count");
$list = ["Пожелание", "Низкий", "Средний", "Высокий", "Критический", "Уязвимость"];
$report = (new BugtrackerReports)->get($report_id);
$report->setPriority($priority);
+
+ if ($points)
+ DB::i()->getContext()->query("UPDATE `profiles` SET `coins` = `coins` + " . $points . " WHERE `id` = " . $report->getReporter()->getId());
+
$report->save();
$this->createComment($report, $comment, "Новый приоритет отчёта — $list[$priority]", TRUE);
diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js
index 6e484cd6..21591354 100755
--- a/Web/static/js/openvk.cls.js
+++ b/Web/static/js/openvk.cls.js
@@ -481,6 +481,12 @@ function showBtStatusChangeDialog(report, hash) {