Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming any "NamedElement" on the DMN Editor should update all references to the old name #208

Open
13 tasks done
tiagobento opened this issue Apr 14, 2023 · 0 comments · May be fixed by apache/incubator-kie-tools#2760
Open
13 tasks done
Assignees
Labels
area:dmn Related to DMN type:enhancement Something that already exists needs to be improved

Comments

@tiagobento
Copy link

tiagobento commented Apr 14, 2023

When the user renames any "NamedElement" like, for instance, a DataType, an entry in a Context Expression, or a Decision Node, all places where referencing that element should be updated to the new name.

"All places" mean "all FEEL expressions".

Confirmation Dialog
As discussed in the private chat, the rename could result in a refactoring or not, because it is not always that user may want to perform a refactor.

The user may not want to perform a refactor; they can just rename the named object to something else and create a new object with the older name to replace it.

So, for this scenario, we should ask for confirmation from the user, with the following dialog:

image

The confirmation dialog should behave as the following:

  1. When renaming some node, it shows the dialog if the node is being referenced in an expression
  2. When renaming some data type, it shows the dialog if the data type is being referenced in an expression
  3. When renaming an included model (in the Included Models tab), it does not show the dialog, because doesn't make any sense in my opinion to not update the references in this case, since this already was the default behavior before this PR (when we renamed a included model, we already updated all the references except the expressions, now we update the expressions).

Acceptance criteria:

All the following renames should also perform a refactor if the user wants to by confirming in the confirmation dialog:

In DMN editor:

  • Rename the input nodes
  • Rename the nodes by the properties panel
  • Rename business knowledge nodes
  • Rename business knowledge nodes by properties panel
  • Rename decision nodes
  • Rename decision by properties panel
  • Rename data types

In Boxed Expression Editor

  • Rename context
  • Rename the "some" variable in the "Some" expression
  • Rename the "every" variable in the "Every" expression
  • Rename the header of expressions
  • Rename the header of expressions by properties panel

The following refactor should be performed without asking confirmation:

  • Rename an included model
@tiagobento tiagobento converted this from a draft issue Apr 14, 2023
@tiagobento tiagobento added type:enhancement Something that already exists needs to be improved area:dmn Related to DMN labels Apr 14, 2023
@tiagobento tiagobento self-assigned this Aug 14, 2023
@danielzhe danielzhe assigned danielzhe and unassigned tiagobento Dec 5, 2023
@danielzhe danielzhe moved this from 📋 Backlog to ⏳ In Progress in 🦉 KIE Podling Board Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn Related to DMN type:enhancement Something that already exists needs to be improved
Projects
Status: ⏳ In Progress
2 participants