工单的一些参数修改

This commit is contained in:
sylor_huang@126.com 2020-06-01 18:27:17 +08:00
parent b4615c645e
commit 5c4daaeed2
3 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ class IssuesController < ApplicationController
type: "user"
}.merge(tokens_params(@project))
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
issue_params = issue_send_params(params)
@ -159,8 +159,8 @@ class IssuesController < ApplicationController
end
def edit
@all_branches = get_branches
@issue_chosen = issue_left_chosen(@project, @issue.id)
# @all_branches = get_branches
# @issue_chosen = issue_left_chosen(@project, @issue.id)
@issue_attachments = @issue.attachments
end
@ -454,7 +454,7 @@ class IssuesController < ApplicationController
issue_type: params[:issue_type] || "1",
token: params[:token],
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,
issue_classify: "issue",
author_id: current_user.id,

View File

@ -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
json.done_ratio @issue.done_ratio.to_s + "%"
json.issue_tags @issue.get_issue_tags
json.issue_chosen @issue_chosen
json.branches @all_branches
# json.issue_chosen @issue_chosen
# json.branches @all_branches
json.attachments do
json.array! @issue_attachments do |attachment|
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}

View File

@ -15,7 +15,7 @@ json.priority @issue.priority.try(:name)
json.version @issue.version.try(:name)
json.issue_tags @issue.get_issue_tags
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.join_users @join_users
json.cost_time @cost_time_array