]
Michael Anstis updated DROOLS-5062:
-----------------------------------
Summary: [DMN Designer] Systematically correct node prefix/trailing space on import
(was: [DMN Designer] Automatically correct node prefix/trailing space on import)
[DMN Designer] Systematically correct node prefix/trailing space on
import
--------------------------------------------------------------------------
Key: DROOLS-5062
URL:
https://issues.redhat.com/browse/DROOLS-5062
Project: Drools
Issue Type: Bug
Components: DMN Editor
Reporter: Matteo Mortari
Assignee: Michael Anstis
Priority: Major
Attachments: ItemDefinition-white-space.png
I understand [DROOLS-5017] has been re-purposed to allow Info and Warn level messages be
displayed on Stunner Validation dialog. That is fine.
But, imho, an UX point is not being considered, where is necessary instead.
By the DMN spec, a node should not have a prefix/trailing space, as space insensitivity
would mandate 1 trailing or 2 trailing spaces are simply ignored etc.
The engine is lenient to avoid this crashing the evaluation, but still is a bad designed
model to persist the node name (DRGElement name and its corresponding variable name) with
those extra spaces IMHO.
Further, I consider is just the Analyst which slipped a space.
In my perspective, the editor should just strip away the prefix/trailing space:
* While Importing a DMN model from file Upload
* -While editing a DRGElement and hitting OK to save its name- (See
[
DROOLS-5060|https://issues.redhat.com/browse/DROOLS-5060])
For your consideration, thanks.
See
[
comment|https://issues.redhat.com/browse/DROOLS-5060?focusedCommentId=139...]
on DROOLS-5060:-
{quote}
I'd like to move the other request ("While Importing a DMN model from file
Upload") to a new JIRA for the following reason:
* It is an automated correction/cleanse
* We already have one automated correction (when layout information is missing or
insufficient)
* We may, in the future, want to support other automated corrections
* I'd therefore like to consolidate the approach to how automated corrections are
detected, ran and reported to the User. My initial opinion is that when opening (or
importing or some other trigger to be determined) a DMN file we collect (probably via CDI
discovery) all implementations of "Automated Fixers" (one of which if layout
another is trim leading/trailing space etc). We then show the list of possible fixes to
the User, they can select whatever they like and then we run them and save the file.
Anyway, IMO, it's out of scope of this JIRA as it'd need some UX involvement.
{quote}