forked from Gitlink/forgeplus
工单的一些参数修改
This commit is contained in:
parent
b4615c645e
commit
5c4daaeed2
|
@ -111,7 +111,7 @@ class IssuesController < ApplicationController
|
||||||
type: "user"
|
type: "user"
|
||||||
}.merge(tokens_params(@project))
|
}.merge(tokens_params(@project))
|
||||||
user_tokens = Gitea::Repository::Hooks::QueryService.new(query_params).call
|
user_tokens = Gitea::Repository::Hooks::QueryService.new(query_params).call
|
||||||
return normal_status(-1, "悬赏的奖金不足") if user_tokens[:value].to_i < params[:token].to_i
|
return normal_status(-1, "您的token值不足") if user_tokens[:value].to_i < params[:token].to_i
|
||||||
else
|
else
|
||||||
issue_params = issue_send_params(params)
|
issue_params = issue_send_params(params)
|
||||||
|
|
||||||
|
@ -159,8 +159,8 @@ class IssuesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@all_branches = get_branches
|
# @all_branches = get_branches
|
||||||
@issue_chosen = issue_left_chosen(@project, @issue.id)
|
# @issue_chosen = issue_left_chosen(@project, @issue.id)
|
||||||
@issue_attachments = @issue.attachments
|
@issue_attachments = @issue.attachments
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -454,7 +454,7 @@ class IssuesController < ApplicationController
|
||||||
issue_type: params[:issue_type] || "1",
|
issue_type: params[:issue_type] || "1",
|
||||||
token: params[:token],
|
token: params[:token],
|
||||||
issue_tags_value: params[:issue_tag_ids].present? ? params[:issue_tag_ids].join(",") : "",
|
issue_tags_value: params[:issue_tag_ids].present? ? params[:issue_tag_ids].join(",") : "",
|
||||||
closed_on: (params[:status_id].to_i == 5) ? Time.now : nil,
|
closed_on: (params[:status_id].to_i == 5) ? Time.current : nil,
|
||||||
branch_name: params[:branch_name].to_s,
|
branch_name: params[:branch_name].to_s,
|
||||||
issue_classify: "issue",
|
issue_classify: "issue",
|
||||||
author_id: current_user.id,
|
author_id: current_user.id,
|
||||||
|
|
|
@ -3,8 +3,8 @@ json.extract! @issue, :id,:subject,:description,:is_private,:assigned_to_id,:tra
|
||||||
:start_date,:due_date,:estimated_hours, :issue_type, :token,:issue_classify, :branch_name
|
:start_date,:due_date,:estimated_hours, :issue_type, :token,:issue_classify, :branch_name
|
||||||
json.done_ratio @issue.done_ratio.to_s + "%"
|
json.done_ratio @issue.done_ratio.to_s + "%"
|
||||||
json.issue_tags @issue.get_issue_tags
|
json.issue_tags @issue.get_issue_tags
|
||||||
json.issue_chosen @issue_chosen
|
# json.issue_chosen @issue_chosen
|
||||||
json.branches @all_branches
|
# json.branches @all_branches
|
||||||
json.attachments do
|
json.attachments do
|
||||||
json.array! @issue_attachments do |attachment|
|
json.array! @issue_attachments do |attachment|
|
||||||
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
|
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
|
||||||
|
|
|
@ -15,7 +15,7 @@ json.priority @issue.priority.try(:name)
|
||||||
json.version @issue.version.try(:name)
|
json.version @issue.version.try(:name)
|
||||||
json.issue_tags @issue.get_issue_tags
|
json.issue_tags @issue.get_issue_tags
|
||||||
json.done_ratio @issue.done_ratio.to_s + "%"
|
json.done_ratio @issue.done_ratio.to_s + "%"
|
||||||
json.issue_type @issue.issue_type == "1" ? "普通" : "悬赏"
|
json.issue_type @issue.issue_type
|
||||||
json.token @issue.issue_type == "2" ? @issue.token : ""
|
json.token @issue.issue_type == "2" ? @issue.token : ""
|
||||||
json.join_users @join_users
|
json.join_users @join_users
|
||||||
json.cost_time @cost_time_array
|
json.cost_time @cost_time_array
|
||||||
|
|
Loading…
Reference in New Issue