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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

681 views 17 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you