Skip to content

Set issue_type to incident for new incidents

Sean Arnold requested to merge 219381-issue-type-param-when-creating-issues into master

What does this MR do?

This sets the issue_type for Incident issues correctly to incident.

It achieves this by passing a query param to the IssuesController#new method, which sets a hidden fields on the form. This attribute is then handled though the usual Issue creation flow and set on the Issue model.

To ensure that regular issues are still created correctly I've made some changes to Issues::BuildService to remove the issue_type param if it has not been set - to avoid setting it to nil.

Does this MR meet the acceptance criteria?

Conformity

#219381 (closed)

Edited by Sean Arnold

Merge request reports