Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
commit
2738d950d4
|
@ -29,9 +29,9 @@ class IssuesController < ApplicationController
|
|||
@close_issues = @all_issues.where(status_id: IssueStatus::CLOSED)
|
||||
scopes = Issues::ListQueryService.call(issues,params.delete_if{|k,v| v.blank?}, "Issue")
|
||||
@issues_size = scopes.size
|
||||
@assign_to_me = scopes.where(assigned_to_id: current_user&.id)
|
||||
@my_published = scopes.where(author_id: current_user&.id)
|
||||
@issues = paginate(scopes)
|
||||
@assign_to_me = @issues.where(assigned_to_id: current_user&.id)
|
||||
@my_published = @issues.where(author_id: current_user&.id)
|
||||
|
||||
respond_to do |format|
|
||||
format.json
|
||||
|
@ -149,6 +149,8 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
@issue.project_trends.create(user_id: current_user.id, project_id: @project.id, action_type: "create")
|
||||
@issue.project_trends.create(user_id: current_user.id, project_id: @project.id, action_type: ProjectTrend::CLOSE) if params[:status_id].to_i == 5
|
||||
|
||||
|
||||
Rails.logger.info "[ATME] maybe to at such users: #{@atme_receivers.pluck(:login)}"
|
||||
AtmeService.call(current_user, @atme_receivers, @issue) if @atme_receivers.size > 0
|
||||
|
|
|
@ -14,6 +14,7 @@ class Projects::TransferService < ApplicationService
|
|||
update_owner
|
||||
update_repo_url
|
||||
update_visit_teams
|
||||
update_fork_info
|
||||
end
|
||||
|
||||
Rails.logger.info("##### Project transfer_service end ######")
|
||||
|
@ -40,6 +41,11 @@ class Projects::TransferService < ApplicationService
|
|||
end
|
||||
end
|
||||
|
||||
def update_fork_info
|
||||
fork_user = ForkUser.find_by(user_id: @owner.id, fork_project_id: @project.id)
|
||||
fork_user.update(user_id: @new_owner.id) if fork_user.present?
|
||||
end
|
||||
|
||||
def gitea_update_owner
|
||||
begin
|
||||
@gitea_repo = Gitea::Repository::TransferService.call(owner&.gitea_token, owner&.login, project.identifier, new_owner&.login)
|
||||
|
|
Loading…
Reference in New Issue