Skip to content

Commit

Permalink
LiquidPlanner: fix how PTN/LP cross refs are created
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Feb 4, 2021
1 parent a8bd2d0 commit d20277a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lib/Synergy/Reactor/LiquidPlanner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2247,10 +2247,22 @@ sub _execute_task_creation_plan ($self, $event, $plan, $error) {
if ($plan->{helpspot_tickets} && $plan->{helpspot_tickets}->@*) {
if (my $helpspot = $self->hub->reactor_named('helpspot')) {
$helpspot->_http_post('private.request.update', {
tNote => "LiquidPlanner task created at $item_uri",
fNoteType => 0,
})->retain;
for my $ptn ($plan->{helpspot_tickets}->@*) {
$helpspot->_http_post('private.request.update', {
xRequest => $ptn,
tNote => "LiquidPlanner task created at $item_uri",
fNoteType => 0,
})->then(sub ($res) {
unless ($res->is_success) {
$event->reply("I couldn't add a comment to PTN $ptn for the task, sorry.");
}
return Future->done;
})->else(sub {
$event->reply("I couldn't add a comment to PTN $ptn for the task, sorry.");
$Logger->log([ "something went wrong posting to HelpSpot", $_[0]->as_string ]);
return Future->done;
})->retain;
}
}
}
});
Expand Down

0 comments on commit d20277a

Please sign in to comment.