You can use some plugin like scriptrunner or jira misc workflow. Here more info:
Hope it will help
We have this plugins already in place,I am new to groovy scripts so looking for particular piece of working code which will help.
I am sure we can use listener to achieve this.
Jira may be a staple part of your workday, but your colleagues, customers, business partners or an auditor might need information presented in a different format, that is easy to access and read. And...
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