Hello Vijay,
You will need the Script Runner plugin: https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner
Please follow questions like https://answers.atlassian.com/questions/267139 to get an idea.
It looks like you're new here. Sign in or register to get started.