Skip to content

Allow issue type change - update styles

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 an GraphQL query here which we can slowly refractor the other grandchild components to use Apollo cache as the state management.
  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 delete issue button !61363 (merged)
Update template select styles 🤘
Remove incident label for old incident -> issue change !61495 (merged)
Swap edit actions alert for GlModal !61503 (merged)
Update documentation !61506 (merged)

Screenshots (strongly suggested)

Screenshot_2021-05-11_at_11.27.36

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