Browse Source

fix: change issues priority id default value

tags/v4.0.0^2
yystopf 4 years ago
parent
commit
22f3371090
4 changed files with 8 additions and 3 deletions
  1. +1
    -1
      app/controllers/pull_requests_controller.rb
  2. +1
    -1
      app/controllers/repositories_controller.rb
  3. +1
    -1
      app/models/issue.rb
  4. +5
    -0
      db/migrate/20211129025810_change_issues_priority_id_default.rb

+ 1
- 1
app/controllers/pull_requests_controller.rb View File

@@ -288,7 +288,7 @@ class PullRequestsController < ApplicationController
assigned_to_id: params[:assigned_to_id],
fixed_version_id: params[:fixed_version_id],
issue_tags_value: params[:issue_tag_ids].present? ? params[:issue_tag_ids].join(",") : "",
priority_id: params[:priority_id] || "2",
priority_id: params[:priority_id],
issue_classify: "pull_request",
issue_type: params[:issue_type] || "1",
tracker_id: 2,


+ 1
- 1
app/controllers/repositories_controller.rb View File

@@ -340,7 +340,7 @@ class RepositoriesController < ApplicationController
issue_type: "1",
tracker_id: 2,
status_id: 1,
priority_id: params[:priority_id] || "2"
priority_id: params[:priority_id]
}
@pull_issue = Issue.new(issue_params)
if @pull_issue.save!


+ 1
- 1
app/models/issue.rb View File

@@ -11,7 +11,7 @@
# category_id :integer
# status_id :integer not null
# assigned_to_id :integer
# priority_id :integer not null
# priority_id :integer
# fixed_version_id :integer
# author_id :integer not null
# created_on :datetime


+ 5
- 0
db/migrate/20211129025810_change_issues_priority_id_default.rb View File

@@ -0,0 +1,5 @@
class ChangeIssuesPriorityIdDefault < ActiveRecord::Migration[5.2]
def change
change_column_null :issues, :priority_id, true
end
end

Loading…
Cancel
Save