Restrict change of issue type

It's not possible to change type of a work item when updating the work item (yet). But because work items are issues, it's still possible to use Issues API to change the type for a work item.

For example supposing there is an Objective with iid 114, I can still use updateIssue mutation to change the Objective to e.g. Test case:

mutation {
  updateIssue(input: {projectPath: "flightjs/Flight", iid:"144", type: TEST_CASE}) {
    errors
  }
}

From tests coverage I think it's allowed to switch types to allow users to change an issue to an incident. But because there are not any restrictions/checks between which types user switches, user can switch also to any of work item types.

Although the plan is to allow changing of type for work items in future, I'm afraid that current change of types through Issues API is rather unintentional and should be restricted only to "legacy" issue types - so user can switch only between "issue" and "incident" through Issues API. Side effect of allowing changing of type is that user can work-around hierarchy restrictions by changing parent's issue type for Objective to Task.