Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Problem with sending notifications



I use a script to send mattermost notifications if new tasks are created. He works. But if the title/name of the task has this " " sign, the notification does not come..  



import import com.atlassian.jira.component.ComponentAccesso

def hookURL = "https://****/hooks/***"

def activitiRestClient = new RESTClient(hookURL)

def creator = issue.getCreator()
def creatorUsername = creator.getUsername()
def creatorName = creator.getDisplayName()

def issueKey = issue.getKey()
def issueSummary = issue.getSummary()
def priority = issue.getPriority().name

def customFieldManager = ComponentAccessor.getCustomFieldManager()

def cFieldTeam = customFieldManager.getCustomFieldObjectByName("command")
def team = issue.getCustomFieldValue(cFieldTeam).toString()

def cFieldSeverity = customFieldManager.getCustomFieldObjectByName("Severity")
def severity = issue.getCustomFieldValue(cFieldSeverity).toString()

def cFieldWhereBugFound = customFieldManager.getCustomFieldObjectByName("where is the error")
def whereBugFound = issue.getCustomFieldValue(cFieldWhereBugFound).toString()

def teamMentionMap = [
"Bw2": "@bug_%s_b2c",
"wer": "@bug_%s_omni",
"vf": "@bug_%s_kpp",
"wed": "@bug_%s_oes",
"erf": "@bug_%s_core",
"edvf": "@bug_%s_wlk",
"not specified": "command not specified but %s!"

def scopeMap = [
"prod": "prod",
"test": "test"

def teamMention = String.format(teamMentionMap.get(team), scopeMap.get(whereBugFound));

def body = "{\"username\":\"New Bug\","
body += "\"icon_emoji\":\":ladybug:\","
body += "\"attachments\":[{\"color\":\"#FA5537\","
body += "\"text\": \"${issueSummary}\","
body += "\"title\": \"${issueKey}\","
body += "\"title_link\": \"https://***/jira/browse/${issueKey}\"}],"
body += "\"text\":\"${teamMention} new issue **${creatorName}** (@${creatorUsername})\n"
body += "Priority: **${priority}**, Severity: **${severity}**, where is the error?: **${whereBugFound}**\"}"
contentType: "text/plain",
requestContentType: "application/json",
body: body,

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events