Allow issue type change [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
The smallest MVC possible for: #268370 (closed) where we allow users to change between issue
and incident
inside the issue details form. When the user changes the dropdown, they will be redirected to the correct URL based on the type selected.
As this is an MVC we have made a few technical concessions to adhere to best practices and not add to the performance burden:
- On update, the page allows for the issue data API call to resolve and then visit the new URL depending on the choice made by the user.
/issues/iid
or /issues/incident/iid
- We avoid adding anything to the current polling setup where possible as we don't want to add burden to the current performance.
- We avoid directly calling the updateIssusable mixin to avoid needing to mutate a prop, this is an anti-pattern and so we have introduced a
emit
method here which we can slowly refractor the other grandchild components to use. - We try to avoid using
setData
andsetProps
in the specs, instead, we keep the unit tests minimal and opt for feature specs to avoid bad coding patterns.
This merge will be followed by a selection of other merges based on UX's DDoD for this feature before it is considered user-friendly.
Merge train
What | Merge |
---|---|
Dropdown select on details form | |
Update template select styles | TBA |
Update delete issue button | TBA |
Remove incident label for old incident -> issue change |
TBA |
Update documentation | TBA |
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. - [-] I have not included a changelog entry because _____.
-
- [-] Documentation (if required)
- [-] Code review guidelines
- [-] Merge request performance guidelines
- [-] Style guides
- [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Related to #268370 (closed)
Edited by David O'Regan