Skip to content

Commit

Permalink
update error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Emslie committed Oct 27, 2021
1 parent c0a5775 commit 2333d23
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/block-duplicate-observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,26 +203,27 @@ class duplicateObserver implements IWorkItemNotificationListener {

// did we find any duplicates?
if (duplicate) {
const typeFilter: string = sameType ? 'of the same type ' : '';
if (includeTitle && includeDesciption) {
this._logger.info(
'A duplicate work item of the same type exists with similar title and description.'
`A duplicate work item ${typeFilter}exists with similar title and description.`
);
this._workItemFormService.setError(
'A duplicate work item of the same type exists with similar title and description.'
`A duplicate work item ${typeFilter}exists with similar title and description.`
);
} else if (includeTitle) {
this._logger.info(
'A duplicate work item of the same type exists with similar title.'
`A duplicate work item ${typeFilter}exists with similar title.`
);
this._workItemFormService.setError(
'A duplicate work item of the same type exists with similar title.'
`A duplicate work item ${typeFilter}exists with similar title.`
);
} else {
this._logger.info(
'A duplicate work item of the same type exists with similar description.'
`A duplicate work item ${typeFilter}exists with similar description.`
);
this._workItemFormService.setError(
'A duplicate work item of the same type exists with similar description.'
`A duplicate work item ${typeFilter}exists with similar description.`
);
}
} else {
Expand Down

0 comments on commit 2333d23

Please sign in to comment.