Skip to content

Commit 8f87a2f

Browse files
authored
Merge pull request #253 from ds-wizard/release/4.14.1
Release 4.14.1
2 parents 9d321e5 + b2238d0 commit 8f87a2f

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

registry-public/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: registry-public
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Registry Public
44
description: Registry Public
55
category: Web

registry-server/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: registry-server
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Engine Registry
44
description: Engine Registry
55
category: Web

registry-server/src/Registry/Api/Handler/Swagger/Api.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ swagger =
3838
s._swaggerInfo
3939
{ _infoTitle = "Registry API"
4040
, _infoDescription = Just "API specification for Registry"
41-
, _infoVersion = "4.14.0"
41+
, _infoVersion = "4.14.1"
4242
, _infoLicense =
4343
Just $
4444
License

shared-common/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: shared-common
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Engine Shared
44
description: Engine Shared
55
category: Web

wizard-common/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wizard-common
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Wizard Engine
44
description: Wizard Engine
55
category: Web

wizard-public/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wizard-public
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Wizard Public
44
description: Wizard Public
55
category: Web

wizard-server/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wizard-server
2-
version: '4.14.0'
2+
version: '4.14.1'
33
synopsis: Engine Wizard
44
description: Engine Wizard
55
category: Web

wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ swagger =
140140
s._swaggerInfo
141141
{ _infoTitle = "Wizard API"
142142
, _infoDescription = Just "API specification for Wizard"
143-
, _infoVersion = "4.14.0"
143+
, _infoVersion = "4.14.1"
144144
, _infoLicense =
145145
Just $
146146
License

wizard-server/src/Wizard/Service/Document/DocumentService.hs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ createDocumentPreviewForQtn qtnUuid =
129129
tml <- getDocumentTemplateByUuidAndPackageId tmlId (Just qtn.packageId)
130130
pkg <- getPackageById qtn.packageId
131131
qtnCtn <- compileQuestionnaire qtn
132-
createDocumentPreview tml pkg [] qtn qtnCtn.phaseUuid qtnCtn.replies formatUuid
132+
createDocumentPreview tml pkg [] qtn qtnCtn.phaseUuid qtnCtn.replies formatUuid False
133133
_ -> throwError $ UserError _ERROR_SERVICE_DOCUMENT__TEMPLATE_OR_FORMAT_NOT_SET_UP
134134

135135
createDocumentPreviewForDocTmlDraft :: String -> AppContextM (Document, TemporaryFileDTO)
@@ -143,7 +143,7 @@ createDocumentPreviewForDocTmlDraft tmlId =
143143
pkg <- getPackageById qtn.packageId
144144
checkViewPermissionToQtn qtn.visibility qtn.sharing qtn.permissions
145145
qtnCtn <- compileQuestionnaire qtn
146-
createDocumentPreview draft pkg [] qtn qtnCtn.phaseUuid qtnCtn.replies formatUuid
146+
createDocumentPreview draft pkg [] qtn qtnCtn.phaseUuid qtnCtn.replies formatUuid False
147147
(_, Just branchUuid, Just formatUuid) -> do
148148
draft <- findDraftById tmlId
149149
let pkg = toTemporaryPackage draft.tenantUuid draft.createdAt
@@ -152,11 +152,11 @@ createDocumentPreviewForDocTmlDraft tmlId =
152152
checkPermission _KM_PERM
153153
mCurrentUser <- asks currentUser
154154
let qtn = toTemporaryQuestionnaire branch pkg mCurrentUser
155-
createDocumentPreview draft pkg branchData.events qtn Nothing branchData.replies formatUuid
155+
createDocumentPreview draft pkg branchData.events qtn Nothing branchData.replies formatUuid True
156156
_ -> throwError $ UserError _ERROR_SERVICE_DOCUMENT__QUESTIONNAIRE_OR_FORMAT_NOT_SET_UP
157157

158-
createDocumentPreview :: DocumentTemplate -> Package -> [Event] -> Questionnaire -> Maybe U.UUID -> M.Map String Reply -> U.UUID -> AppContextM (Document, TemporaryFileDTO)
159-
createDocumentPreview tml pkg branchEvents qtn phaseUuid replies formatUuid = do
158+
createDocumentPreview :: DocumentTemplate -> Package -> [Event] -> Questionnaire -> Maybe U.UUID -> M.Map String Reply -> U.UUID -> Bool -> AppContextM (Document, TemporaryFileDTO)
159+
createDocumentPreview tml pkg branchEvents qtn phaseUuid replies formatUuid fromBranch = do
160160
docs <- findDocumentsForCurrentTenantFiltered [("questionnaire_uuid", U.toString qtn.uuid), ("durability", "TemporallyDocumentDurability")]
161161
tenantConfig <- getCurrentTenantConfig
162162
mCurrentUser <- asks currentUser
@@ -184,7 +184,8 @@ createDocumentPreview tml pkg branchEvents qtn phaseUuid replies formatUuid = do
184184
now <- liftIO getCurrentTime
185185
let doc = fromTemporallyCreateDTO dUuid qtn tml.tId formatUuid repliesHash mCurrentUser tenantConfig.uuid now
186186
insertDocument doc
187-
publishToPersistentCommandQueue doc pkg branchEvents qtn (Just replies)
187+
let mReplies = if fromBranch then Just replies else Nothing
188+
publishToPersistentCommandQueue doc pkg branchEvents qtn mReplies
188189
return (doc, TemporaryFileMapper.emptyFileDTO)
189190

190191
publishToPersistentCommandQueue :: Document -> Package -> [Event] -> Questionnaire -> Maybe (M.Map String Reply) -> AppContextM ()

0 commit comments

Comments
 (0)