removing unnecessary line
refractoring code for setting autoset_owner_id
refractoring logic to determine whether to add a case sharing assertion