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,558,997
Community Members
 
Community Events
184
Community Groups

ScriptRunner to update a custom field when JIRA service desk public comment added

Hi, I would like to ask a questions. How can I script with ScriptRunner f9r updating a custom field (type: date) when JIRA service desk "public" comment (from customer or agent's comment shared with customer) added.

The purpose of this is to keep "last customer interacted date" for each ticket. Only customer feedback and agent's comments to customer will be counted. Internal comment creation time will be ignored.

Thanks for your technical sharing. 

1 answer

0 votes
Daniel Yelamos [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 23, 2017

Hello Louis.

You would add a custom listener to an issue. That triggers on "Issue Commented" event.

Aftewards, in the script you would check if the event is an internal or a public comment, and update the customfield accordingly. 

There are a lot of examples in both this community and our official documentation on how to do parts of this. In my opinion you should search for:

1. How to update a custom field.

2. How to see if a comment event is public or not?(this would most certainly be in the atlassian official java api documentation)

With examples of both of this you should be able to create that script.

Does this make sense? If you want a more specific example for this you might have to wait awhile because we are currently flooded and custom scripting is something that takes us a bit of time.

Cheers.

Dyelamos 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events