From 22bd05350d8171c51311fc9abe6586f952e00b9a Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 30 Apr 2020 14:43:23 -0400 Subject: [PATCH] mark reports as opened when claimed and unclaimed --- lib/philomena/reports/report.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/philomena/reports/report.ex b/lib/philomena/reports/report.ex index 5179eecc..4eaf1854 100644 --- a/lib/philomena/reports/report.ex +++ b/lib/philomena/reports/report.ex @@ -39,12 +39,14 @@ defmodule Philomena.Reports.Report do change(report) |> validate_inclusion(:admin_id, []) |> put_change(:admin_id, user.id) + |> put_change(:open, true) |> put_change(:state, "in_progress") end def unclaim_changeset(report) do change(report) |> put_change(:admin_id, nil) + |> put_change(:open, true) |> put_change(:state, "open") end