Use issues.correct_work_item_type when setting the type of an issue

With #493976 (closed) we changed all the code to use the issues.correct_work_item_type_id column to fetch type information on issues. Now we need to do the same when inserting or updating the type of an issue

Edited by Mario Celi