Merge request fails with 500 Internal Server Error

Hello,

Once the Merge request fails with 500 internal error we can see in the internal gitlab pod logs messages as:

Started PUT “/swm-mid-term-correction-working-group/omega-prod/merge_requests/133?merge_request%5Bstate_event%5D=close” for 10.131.0.1 at 2020-10-09 07:57:42 +0000
Processing by Projects::MergeRequestsController#update as HTML
Parameters: {“authenticity_token”=>"[FILTERED]", “merge_request”=>{“state_event”=>“close”}, “namespace_id”=>“swm-mid-term-correction-working-group”, “project_id”=>“omega-prod”, “id”=>“133”}
Completed 500 Internal Server Error in 76ms (ActiveRecord: 26.5ms | Elasticsearch: 0.0ms)

ActiveModel::MissingAttributeError (can’t write unknown attribute state):

Parameters: {“namespace_id”=>“fis3”, “project_id”=>“equipment-monitoring”, “target_type”=>“merge_request”, “target_id”=>“31419”}
Started GET “/fis3/organisation/noteable/merge_request/31457/notes” for 10.129.0.1 at 2020-10-09 08:00:46 +0000
Completed 500 Internal Server Error in 351ms (ActiveRecord: 218.0ms | Elasticsearch: 0.0ms)

NoMethodError (undefined method `state_changed?’ for #<MergeRequest id:31456 fis3/sales-valuation!267>
Did you mean? state_id_changed?
saved_changes?):

ActionView::Template::Error (undefined method created?' for nil:NilClass): ActiveModel::MissingAttributeError (can't write unknown attribute state): Did you mean? state_id_changed? NoMethodError (undefined method state_changed?’ for #<MergeRequest id:31289 fis3/document-processing!237>

Is there a workaround for these errors?
The gitlab instance where we faced these errors is a production instance, and customer cannot perform the merge requests. We have performed an upgrade from 12.4.7 → 12.10.14 → 13.1 which was not successful and we have to rollback.

Can you please let us know if something can be done, if you faced these issues ?