mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge branch 'pm_project_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop
This commit is contained in:
@@ -34,6 +34,7 @@ class Api::V1::Issues::CreateService < ApplicationService
|
||||
@pm_issue_type = params[:pm_issue_type]
|
||||
@root_id = params[:root_id]
|
||||
@time_scale = params[:time_scale]
|
||||
@belink_able_id = params[:link_able_id]
|
||||
end
|
||||
|
||||
def call
|
||||
@@ -70,6 +71,8 @@ class Api::V1::Issues::CreateService < ApplicationService
|
||||
@created_issue.changer_id = @current_user.id
|
||||
@created_issue.save!
|
||||
|
||||
@created_issue.pm_links.find_or_create_by(be_linkable_type: 'Issue', be_linkable_id: @belink_able_id) if @belink_able_id.present?
|
||||
|
||||
if Site.has_blockchain? && @project.use_blockchain
|
||||
if @created_issue.blockchain_token_num.present? && @created_issue.blockchain_token_num > 0
|
||||
Blockchain::CreateIssue.call({user_id: current_user.id, project_id: @created_issue.project_id, token_num: @created_issue.blockchain_token_num})
|
||||
|
||||
Reference in New Issue
Block a user