Skip to content

Commit

Permalink
Merge pull request #1158 from sparc-request/wth-epic-origin-bug
Browse files Browse the repository at this point in the history
wth - (SPARCRequest) Epic Push Origin Bug
  • Loading branch information
Stuart-Johnson committed Oct 17, 2017
2 parents 2daebb7 + c3df7f5 commit 243a054
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/controllers/dashboard/epic_queues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def index
format.json do
if params[:user_change]
@epic_queues = EpicQueue.where(
attempted_push: false,
user_change: true
)
else
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/protocols_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def push_protocol_to_epic protocol
# Thread.new do
begin
# Do the actual push. This might take a while...
protocol.push_to_epic(EPIC_INTERFACE, "pi_email_approval", current_user.id)
protocol.push_to_epic(EPIC_INTERFACE, "submission_push", current_user.id)
errors = EPIC_INTERFACE.errors
session[:errors] = errors unless errors.empty?
@epic_errors = true unless errors.empty?
Expand Down
5 changes: 4 additions & 1 deletion lib/tasks/send_to_epic.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ task send_to_epic: :environment do

epic_queues.each do |eq|
p = Protocol.find(eq.protocol_id)
p.push_to_epic(EPIC_INTERFACE, nil, nil, true)
p.push_to_epic(EPIC_INTERFACE, 'admin_push', eq.identity_id, true)
if p.last_epic_push_status == 'complete'
eq.update_attribute(:attempted_push, true)
end
end
end

0 comments on commit 243a054

Please sign in to comment.