From 6a12373965aff9f80147f8b5bff6a5a104927365 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 25 Jul 2018 18:01:32 +0200 Subject: more refactoring to have reusable bug action across different UI --- bug/operations/set_status.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bug/operations/set_status.go') diff --git a/bug/operations/set_status.go b/bug/operations/set_status.go index 7c718cd6..b62409dc 100644 --- a/bug/operations/set_status.go +++ b/bug/operations/set_status.go @@ -25,3 +25,13 @@ func (op SetStatusOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { return snapshot } + +func Open(b *bug.Bug, author bug.Person) { + op := NewSetStatusOp(author, bug.OpenStatus) + b.Append(op) +} + +func Close(b *bug.Bug, author bug.Person) { + op := NewSetStatusOp(author, bug.ClosedStatus) + b.Append(op) +} -- cgit