Is it possible to create an issue using ScriptRunner's Jobs that sets a specific set of text as the summary along with the current month that the script runs?
Example:
"Set Release for ((September))"
For your requirement, I suggest using the Escalation Service.
Below is a sample working code for your reference:-
import java.time.LocalDate
def currentdate = LocalDate.now()
def currentMonth = currentdate.month
def existingSummary = issue.summary
issue.update {
setSummary("${existingSummary} ${currentMonth.toString()}")
}
Please note that the sample working code above is not 100% exact to your environment. Hence, you will need to make the required modifications.
If you observe in the example code above, I have used a simplified approach via ScriptRunner's HAPI to update the issue instead of using the Issue Manager.
Below is a screenshot of the Escalated Service configuration:-
I am also including a couple of test screenshots to display the Issue's summary before and after the Escalation Service has been triggered:-
1. Before the Escalation Service is triggered
2. After the Escalation Service has triggered
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
Has your question been answered?
If yes, kindly accept this answer.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, to get the current month you can use something like
import java.time.LocalDateTime
def now = LocalDateTime.now()
def month = now.getMonth().toString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.