Skip to content

Commit d20277a

Browse files
committed
LiquidPlanner: fix how PTN/LP cross refs are created
1 parent a8bd2d0 commit d20277a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

lib/Synergy/Reactor/LiquidPlanner.pm

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,10 +2247,22 @@ sub _execute_task_creation_plan ($self, $event, $plan, $error) {
22472247
22482248
if ($plan->{helpspot_tickets} && $plan->{helpspot_tickets}->@*) {
22492249
if (my $helpspot = $self->hub->reactor_named('helpspot')) {
2250-
$helpspot->_http_post('private.request.update', {
2251-
tNote => "LiquidPlanner task created at $item_uri",
2252-
fNoteType => 0,
2253-
})->retain;
2250+
for my $ptn ($plan->{helpspot_tickets}->@*) {
2251+
$helpspot->_http_post('private.request.update', {
2252+
xRequest => $ptn,
2253+
tNote => "LiquidPlanner task created at $item_uri",
2254+
fNoteType => 0,
2255+
})->then(sub ($res) {
2256+
unless ($res->is_success) {
2257+
$event->reply("I couldn't add a comment to PTN $ptn for the task, sorry.");
2258+
}
2259+
return Future->done;
2260+
})->else(sub {
2261+
$event->reply("I couldn't add a comment to PTN $ptn for the task, sorry.");
2262+
$Logger->log([ "something went wrong posting to HelpSpot", $_[0]->as_string ]);
2263+
return Future->done;
2264+
})->retain;
2265+
}
22542266
}
22552267
}
22562268
});

0 commit comments

Comments
 (0)