Ticket custom fields can be constant, i.e. no edits
This commit is contained in:
parent
19c18b031e
commit
d7be2f04b2
3 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,7 @@ WorkflowField
|
|||
type WorkflowFieldType
|
||||
enm WorkflowFieldEnumId Maybe
|
||||
required Bool
|
||||
constant Bool
|
||||
-- filter TicketStatusFilterId
|
||||
|
||||
UniqueWorkflowField workflow ident
|
||||
|
|
|
@ -57,6 +57,7 @@ data NewField = NewField
|
|||
, nfDesc :: Maybe Text
|
||||
, nfType :: WorkflowFieldType
|
||||
, nfReq :: Bool
|
||||
, nfConst :: Bool
|
||||
}
|
||||
|
||||
newFieldAForm :: WorkflowId -> AForm Handler NewField
|
||||
|
@ -66,6 +67,7 @@ newFieldAForm wid = NewField
|
|||
<*> aopt textField "Description" Nothing
|
||||
<*> areq (selectField optionsEnum) "Type*" Nothing
|
||||
<*> areq checkBoxField "Required*" Nothing
|
||||
<*> areq checkBoxField "Constant*" Nothing
|
||||
|
||||
newFieldForm :: WorkflowId -> Form NewField
|
||||
newFieldForm wid = renderDivs $ newFieldAForm wid
|
||||
|
|
|
@ -152,6 +152,7 @@ postWorkflowFieldsR shr wfl = do
|
|||
, workflowFieldType = nfType nf
|
||||
, workflowFieldEnm = Nothing
|
||||
, workflowFieldRequired = nfReq nf
|
||||
, workflowFieldConstant = nfConst nf
|
||||
}
|
||||
runDB $ insert_ field
|
||||
setMessage "Workflow field added."
|
||||
|
|
Loading…
Reference in a new issue