osticket-slack
osticket-slack copied to clipboard
URL in Slack message is incorrect
Showing as https://
Should be https://
I corrected manually by editing slack.php and inserting the '/' [line 66] from:
$heading = sprintf('%s CONTROLSTART%sscp/tickets.php?id=%d|#%sCONTROLEND %s'
to:
$heading = sprintf('%s CONTROLSTART%s/scp/tickets.php?id=%d|#%sCONTROLEND %s'
This solves my problem
There are 3 places that need to be modified to resolve the links in the Slack messages inclusive of line 66 as @mudslide567 commented originally. This is because osTicket itself expects no trailing / on the Helpdesk URL.
in slack.php
line 66 and line 113 should reflect the below
$heading = sprintf('%s CONTROLSTART%s/scp/tickets.php?id=%d|#%sCONTROLEND %s'
(this add a /
between %s
and scp
line 171 should reflect the below
'title_link' => $cfg->getUrl() . '/scp/tickets.php?id=' . $ticket->getId(),
(this adds a /
in front of scp
)