app/concepts/assignable/common_side_effects.rb
# create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
def create_new_assignment_if_save_and_close_clicked!(
        options, model:, current_user:, **
      )
        meta = options['params']['meta']
        if meta && meta['commit'] == 'closeAssignment'
          current_assignment = model.current_assignment
          params = { assignable_id: model.id, assignable_type: model.class.name,
                     creator_id: current_user.id,
                     creator_team_id: current_assignment.receiver_team_id,
                     receiver_id: User.system_user.id, receiver_team_id: nil,
                     message: 'Erledigt!', created_by_system: true,
                     topic: current_assignment.topic }
          ::Assignment::Create.(params, 'current_user' => current_user).success?
        else
          true
        end
      end
def create_new_assignment_if_save_and_close_clicked! ( options , model : , current_user : , ** ) meta = options [ 'params' ] [ 'meta' ] if meta && meta [ 'commit' ] == 'closeAssignment' current_assignment = model . current_assignment params = { assignable_id : model . id , assignable_type : model . class . name , creator_id : current_user . id , creator_team_id : current_assignment . receiver_team_id , receiver_id : User . system_user . id , receiver_team_id : nil , message : 'Erledigt!' , created_by_system : true , topic : current_assignment . topic } :: Assignment :: Create . ( params , 'current_user' => current_user ) . success? else true end end
create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
options
<not_specific>
model
<not_specific>
current_user
<not_specific>