diff --git a/lib/utils/properties-panel.js b/lib/utils/properties-panel.js index 5fe6d95..f3e5a97 100644 --- a/lib/utils/properties-panel.js +++ b/lib/utils/properties-panel.js @@ -48,9 +48,14 @@ export function getEntryIds(report) { const { data = {}, id, - path + path, + entryIds } = report; + if (entryIds) { + return entryIds; + } + if (isPropertyError(data, 'isExecutable')) { return [ 'isExecutable' ]; } @@ -257,7 +262,7 @@ export function getEntryIds(report) { } export function getErrorMessage(id, report) { - const { data } = report; + const { data = {} } = report; // do not override FEEL message if (data.type === ERROR_TYPES.FEEL_EXPRESSION_INVALID) { diff --git a/test/spec/utils/properties-panel.spec.js b/test/spec/utils/properties-panel.spec.js index d4b7950..1317565 100644 --- a/test/spec/utils/properties-panel.spec.js +++ b/test/spec/utils/properties-panel.spec.js @@ -29,6 +29,27 @@ describe('utils/properties-panel', function() { describe('#getEntryId and #getErrorMessage', function() { + it('should keep original entryIds', async function() { + + // given + const node = createElement('bpmn:Process'); + + const rule = () => ({ + check: (node, reporter) => { + reporter.report(node.id, 'My Custom Message' , { entryIds: [ 'myCustomEntry' ] }); + } + }); + + const report = await getLintError(node, rule); + + // when + const entryIds = getEntryIds(report); + + // then + expect(entryIds).to.eql([ 'myCustomEntry' ]); + }); + + it('executable-process - Executable (process)', async function() { // given