Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 893 Bytes

File metadata and controls

56 lines (40 loc) · 893 Bytes

Force the assignee to change when the project is changed

Force the assignee to change when the project is changed.
プロジェクトを変更したら、担当者を強制的に変更します。

Setting

Path Pattern

None

Insert Position

Bottom of issue form

Code

JavaScript

$(function() {

  $('#issue_project_id').on('change', function() {

    switch($('#issue_project_id').val()) {
      case '1':
        $('#issue_assigned_to_id').val('6');
        break;

      case '2':
        $('#issue_assigned_to_id').val('7');
        break;

      case '3':
        $('#issue_assigned_to_id').val('8');
        break;
    }
  });
});

Result

result