Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Add eTaskId to case body
Browse files Browse the repository at this point in the history
  • Loading branch information
varney committed Aug 8, 2023
1 parent ff5f2b0 commit 4d28815
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lib/helpers/case-body-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function createBackOfficeCaseBody(
category = "Övriga ärenden",
contact,
deploymentName,
eTaskId,
externalReference,
origin = "Greenfield",
owner,
Expand All @@ -69,6 +70,7 @@ function createBackOfficeCaseBody(
if (contact) caseBody.contact = contact;
if (deploymentName) caseBody.deploymentName = deploymentName;
if (externalReference) caseBody.externalReference = externalReference;
if (eTaskId) caseBody.eTaskId = eTaskId;

const result = caseSchema.validate(caseBody);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lu-common",
"version": "3.8.2",
"version": "3.8.3",
"description": "",
"main": "index.js",
"engines": {
Expand Down
9 changes: 5 additions & 4 deletions test/unit/utils/case-body-helper-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ describe("create back office case body", () => {
describe("when calling the create body with optional parameters", () => {
it("should create the expected body with sent in parameters", () => {
const deploymentName = "some-deployment",
externalReference = "some-id";
createBackOfficeCaseBody(subject, description, namespace, { deploymentName, externalReference }).should.eql({
externalReference = "some-id", eTaskId = "some-etask-id";
createBackOfficeCaseBody(subject, description, namespace, { deploymentName, externalReference, eTaskId }).should.eql({
...backOfficeCaseBody,
deploymentName: "some-deployment",
externalReference: "some-id",
deploymentName,
externalReference,
eTaskId,
});
});
});
Expand Down

0 comments on commit 4d28815

Please sign in to comment.