Changing the type of a new site doesn't delete the introduced alias
In the modal popup window of creation of a new site, when the user changes the type of the site from parent to child the already introduced alias is removed. When the user changes from a child site to a parent child the alias is also removed.
The goal of this issue is to change this behaviour so when the user changes the type of the site the introduced alias is kept, and also the behaviour of adding/removing the root alias when changing from parent to child and viceversa will be maintained.
QA Test Plan
Please refer to Joe & Cathal's comments
closing as wont fix as code was backed out - any future change requires a new jira
Due to that the described behaviour in the issue was not correct, the changes are undone and the same code is set again. Pending to decide to implement the behaviour specified by Joe Brinkman in the previous comment or not.
The behavior described and shown in the images is not correct. A child URL will typically have a pattern like [host]/[path] whereas a parent URL will typically have a pattern like [host]. When changing between the parent and child site aliases, the [host] part of the site alias is the only common element between the two site alias types. However, when creating a parent portal, you will primarily want to use a new [host] while when creating a child portal you are creating a child under an existing [host]. The only change in behavior that should be considered is to "remember" the parent or child value so if someone goes from parent => child => parent that the original parent value is remembered and likewise if someone goes from child => parent => child that the child value is remembered.