Skip to content

Allow issue type change [RUN ALL RSPEC] [RUN AS-IF-FOSS]

David O'Regan requested to merge 268370-change-issue-type-fe into master

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:

  1. 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

  1. We avoid adding anything to the current polling setup where possible as we don't want to add burden to the current performance.
  2. 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.
  3. We try to avoid using setData and setProps 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)

R1

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Merge request reports