Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Escalate Priority based on Date/Time

Anthony Zepeda
February 12, 2018

I am trying to see if there is a way to automatically  escalate a ticket based on a date/time set. So if I create a Medium Priority ticket, and set a date/time for tomorrow at 10AM, tomorrow at 10AM, i then automatically changes to a High Priority ticket. I currently have the script runner and automation for jira addons, but not have not been successful in being able to implement this. Does anyone have any ideas on this? 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Joanna Choules
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 Champions.
February 16, 2021

Hi Jason,

Do you recall where you found this snippet? The first argument to setCustomFieldValue needs to be a CustomField object rather than a plain string:

def cfParticipant = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Request participants")

The above assumes that you have ComponentAccessor imported; if not, you can do so at the top of your script as follows:

import com.atlassian.jira.component.ComponentAccessor

Note also that ScriptRunner will issue a deprecation warning against the use of getCustomFieldObjectByName. It is safe to ignore this, although for maximum futureproofing you may prefer to replace that call with the following:

getCustomFieldObjectsByName("Request participants")[0]

Regards,

Joanna Choules, Adaptavist Product Support

Jason Li Ting Chung
Contributor
February 21, 2021

Hi Joanna.

Thank you very much for your help. I have been able to sort the problem.

 

Best regards,

Jason

TAGS
AUG Leaders

Atlassian Community Events