From 17fe163c09e1086d3dec7e0e2eaff3ab682507de Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Mon, 3 Jun 2019 11:02:28 +0000 Subject: [PATCH] Rename ticketDesc to ticketSource --- src/Vervis/Form/Ticket.hs | 4 ++-- src/Vervis/Handler/Ticket.hs | 4 ++-- src/Vervis/Migration.hs | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Vervis/Form/Ticket.hs b/src/Vervis/Form/Ticket.hs index 5cf861c..9b46a0e 100644 --- a/src/Vervis/Form/Ticket.hs +++ b/src/Vervis/Form/Ticket.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016 by fr33domlover . + - Written in 2016, 2019 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -129,7 +129,7 @@ editTicketContentAForm ticket = Ticket aopt textareaField "Description (Markdown)" - (Just $ Just $ Textarea $ ticketDesc ticket) + (Just $ Just $ Textarea $ ticketSource ticket) ) <*> pure (ticketAssignee ticket) <*> pure (ticketStatus ticket) diff --git a/src/Vervis/Handler/Ticket.hs b/src/Vervis/Handler/Ticket.hs index 3acad65..a93cd18 100644 --- a/src/Vervis/Handler/Ticket.hs +++ b/src/Vervis/Handler/Ticket.hs @@ -153,7 +153,7 @@ postTicketsR shar proj = do , ticketCreated = now , ticketCreator = author , ticketTitle = ntTitle nt - , ticketDesc = ntDesc nt + , ticketSource = ntDesc nt , ticketAssignee = Nothing , ticketStatus = TSNew , ticketClosed = UTCTime (ModifiedJulianDay 0) 0 @@ -253,7 +253,7 @@ getTicketR shar proj num = do , deps, rdeps ) encodeHid <- getEncodeKeyHashid - let desc = renderSourceT Markdown $ T.filter (/= '\r') $ ticketDesc ticket + let desc = renderSourceT Markdown $ T.filter (/= '\r') $ ticketSource ticket discuss = discussionW (return $ ticketDiscuss ticket) diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 2bee29e..b49ec0e 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -511,6 +511,8 @@ changes hLocal ctx = [ Message201906Source =. source , Message201906Content =. content ] + -- 88 + , renameField "Ticket" "desc" "source" ] migrateDB :: MonadIO m => Text -> HashidsContext -> ReaderT SqlBackend m (Either Text (Int, Int))