Skip to content

Commit

Permalink
exui-2085-passing flag to differentiate task completed by event (#1753)
Browse files Browse the repository at this point in the history
* passing flag to differentiate task completed by event

* added extra param to differentiate task completion through the event

* version updated
  • Loading branch information
RiteshHMCTS authored Aug 5, 2024
1 parent 7927b01 commit d21086e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
## RELEASE NOTES


### Version 7.0.54
**EXUI-2085** Add Task completion logs in app insight

### Version 7.0.53
**EXUI-1540** revert this change

### Version 7.0.52
**EXUI-1117** Improve robustness to malformed dynamic list data

### Version 7.0.51
**EXUI-2051** Unable to Add documents

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": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.53",
"version": "7.0.54",
"engines": {
"node": ">=18.19.0"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.53",
"version": "7.0.54",
"engines": {
"node": ">=18.19.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('WorkAllocationService', () => {

it('should call post with the correct parameters', () => {
workAllocationService.completeTask(MOCK_TASK_1.id).subscribe();
expect(httpService.post).toHaveBeenCalledWith(TASK_COMPLETE_URL, {});
expect(httpService.post).toHaveBeenCalledWith(TASK_COMPLETE_URL, { actionByEvent: true });
});

it('should set error service error when the call fails', (done) => {
Expand Down Expand Up @@ -255,7 +255,7 @@ describe('WorkAllocationService', () => {

it('should call post with the correct parameters', () => {
workAllocationService.assignAndCompleteTask(MOCK_TASK_1.id).subscribe();
expect(httpService.post).toHaveBeenCalledWith(TASK_COMPLETE_URL, {completion_options: {assign_and_complete: true}});
expect(httpService.post).toHaveBeenCalledWith(TASK_COMPLETE_URL, {completion_options: {assign_and_complete: true}, actionByEvent: true});
});

it('should set error service error when the call fails', (done) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class WorkAllocationService {
console.log(`completeTask: completing ${taskId}`);
const url = `${this.appConfig.getWorkAllocationApiUrl()}/task/${taskId}/complete`;
return this.http
.post(url, {})
.post(url, { actionByEvent: true })
.pipe(
catchError(error => {
this.errorService.setError(error);
Expand All @@ -131,7 +131,8 @@ export class WorkAllocationService {
.post(url, {
completion_options: {
assign_and_complete: true
}
},
actionByEvent: true
})
.pipe(
catchError(error => {
Expand Down

0 comments on commit d21086e

Please sign in to comment.