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

[frontend/backend] Fix changing entity name to same as alias #4871

Merged
merged 9 commits into from Dec 2, 2023

Conversation

Megafredo
Copy link
Member

Proposed changes

  • Fix changing entity name to same as alias
  • Fix creating alias name to same as entity

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Behavior before fix :
OpenCTI_alias_before_fix

Behavior after fix :
OpenCTI_alias_after_fix

@labo-flg
Copy link
Member

labo-flg commented Nov 9, 2023

Would it make more sense for the user (in terms of UX) to have a validation in the form instead of "not doing the requested changes" being his back?

I mean, you edit the name, put one of its alias, the form is red with proper error like "Cannot rename to an alias".

IMO disallowing bad behavior with explanation is better UX (educating user).

@Megafredo
Copy link
Member Author

Megafredo commented Nov 9, 2023

Yes indeed, having a visual way to communicate why adding the alias does not work can be a good approach (in terms of UX).

setOpenCommitCreate(false);
setNewAlias('');
resetForm();
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we display an error message here to notify the user that the alias can't be named the same as the entity name.

Copy link
Member

@labo-flg labo-flg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering we leave the UX improvements for later, it looks ok to me !

@richard-julien
Copy link
Member

Just thinking with Souad about a little missing piece at creation.
Alias should also be purged of the name when creating the entity.
Dont hesitate to join me to have more information @Megafredo

@richard-julien richard-julien merged commit f4c902e into master Dec 2, 2023
6 checks passed
@richard-julien richard-julien deleted the issue/4798 branch December 2, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot modify the name of an entity if already present in the alias of the same entity
4 participants