Hi all,
I use Scriptrunner SlackUtil class to send messages to Slack when an issue is transitioned to a certain status.
I wanted to reuse the same groovy script for all projects, so I stored the destination channel name as a project property, because each project has its own team & dedicated Slack channel.
The problem is that sometimes the project admin writes a wrong channel name, so I'd like to do an up-front validation of the connection before actually sending the message.
For now, as an alternative (and ugly) solution, I changed the script to be executed in the Validation of the transition, instead of the Post Function. I put the SlackUtil.message code within a try catch and return an invalid input exception if it fails.
What I'd like to have instead, is:
Is this possible?
Best regards
Solved! Go to Solution.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.