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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,773
Community Members
 
Community Events
176
Community Groups

Scriptrunner : Send Notification Post Function

Edited

Hi I encountered this error when using the Send Notification post function. Please advise. Thank you

2018-10-08 09:00:08.382 INFO - Serializing object into 'interface java.util.List'
2018-10-08 09:00:08.740 INFO - GET /rest/api/2/field asObject Request Duration: 2775ms
2018-10-08 09:00:08.881 ERROR - Cannot get property 'id' on null object on line 5
2018-10-08 09:00:08.906 ERROR - Class: com.adaptavist.sr.cloud.workflow.SendNotification, Config: [className:com.adaptavist.sr.cloud.workflow.SendNotification, uuid:1512ed34-ee27-49ce-9c22-601c21ad5ca2, description:Send email to POS Ops and Bryan , enabled:true, users:test@email.com, subject:New iSC Tenant, html:def fields = get('/rest/api/2/field')
        .asObject(List)
        .body as List<Map>

def customFieldId = fields.find { it.name == 'TextFieldB' }.id as String
def customFieldValue = (issue.fields[customFieldId] as Map)?.value

"""Dear ${issue.fields.assignee?.displayName},

The ${issue.fields.issuetype.name} ${issue.key} with priority ${issue.fields.priority?.name} has been assigned to you.

Description: ${issue.fields.description}

Custom field value: ${customFieldValue}

Regards,
${issue.fields.reporter?.displayName}"""
, executionUser:INITIATING_USER, userKey:admin, accountId:5afbf021d17d8405fa4357bc]

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events