Es posible cambiar el campo prioridad dinamicamente ?
Asked by Gerardo Ramos:

Mi duda es saber si es posible cambiar el campo prioridad de una incidencia de manera din?mica en base al impacto y a la urgencia.   

en mi espacio de trabajo tengo 5 prioridades 1 de ellas esta seteada por default esto me est? generando problemas porque en la organizaci?n se usa una matriz de incidencia en base al impacto y la urgencia lo que significa que todos los incidentes se lanzan en prioridad Low y en ese proceso de creaci?n corre una regla que cambia la prioridad, mi problema es que se quiere implementar las notificaciones v?a JIRA Mobile y al estar seteado esto por default significa que todos los incidentes en primera instancia se crean como prioridad baja y de esta manera llega la notificaci?n a JIRA.  

no importa que la urgencia y el impacto sean altos, las notificaciones siempre llegan como prioridad Low.  

Lo que busco es que el campo prioridad cambie autom?ticamente en base al Impacto y la urgencia.  

Muchas gracias :)


Answers:
author: Joseph Chung Yin
body: [@Gerardo Ramos](/t5/user/viewprofilepage/user-id/5587017) -

Welcome to the community. You should take a look at Automations for Jira to create automation rules to achieve what you needed.

An automation rule can be triggered off when issue is created, then it can contain additional conditions to execute the changes to the priority assignment from the default value via edit issue action + create custom notification using send mail action.

Here are the links that you should look into regarding to Automations for Jira -

<https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/>

[https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all\&page=1\&pageSize=20](https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all&page=1&pageSize=20)

Hope this also helps.

Best, Joseph Chung Yin

comments: author: Carlos Garcia Navarro
body: I think those automation rules would change the priority after the creation of the ticket. My understanding of this issue is that we want to set the priority during the creation of the ticket.


author: Joseph Chung Yin
body: [@Carlos Garcia Navarro](/t5/user/viewprofilepage/user-id/1031232) -

Is that your intention that you want the priority to be displayed in the issue details via the portal UI for customers to see it? Or, are you talking about Jira Software Application product and not JSM?

Best, Joseph


author: Gerardo Ramos
body: Hi [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) thanks for your answer and [@Carlos Garcia Navarro](/t5/user/viewprofilepage/user-id/1031232)  

now [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) what is says Carlos is rigth those automations change the priority once the incident is created what I want is change the priority according to the Impact and the Urgency if it's possible before the incident is triggered as it work in another apps like Service Now, so let me show you what is happening   

i'll share you 2 images and explain a little bit what i'm trying to do   
I wanna set an on call schedule and some priority rules all this to allow users use JIRA Mobile  
so what is happening here is that when you trigger and incident the priority Low is set as default then the automation that i have set run and according to the urgency and impact the priority will change.

But this behaviour is not correct or it should not work on this way cuz inicially JIRA is creating the inciden as Low and on the way it changes its priority wich means that originally the incident is being triggered as Low and this is causing that JIRA mobile shows incident's priority as the default value and you can see it in the images

Incident was created as   
Impact: Extensive / widespread  
Urgency: Critical   
which means Priority is Critical   
but if you see the Email screen in description I tag the priority and it shows Low and in the name priority P4 aditionally the notification that i'm receiving en JIRA mobile is P4 and this is why the on call is no working a it should   

I share an image from SN to let you know how is it working and how is expect JIRA works too :)   

i doesn't matter if it is a P1 or a P2 priority aplication and Email always is gonna take the default proprity as first configuration i'would eventually change but on its way  

seems JIRA not allow this kind of behaviour.  

thanks and regards

![JIRA 1.png](https://community.atlassian.com/t5/image/serverpage/image-id/347616iE18CFFFF55ABA714/image-size/large?v=v2&px=999 "JIRA 1.png")![JIRA 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/347614i6EA766DE8885068B/image-size/large?v=v2&px=999 "JIRA 2.png")

Service Now![Image SN.png](https://community.atlassian.com/t5/image/serverpage/image-id/347615iF866DCB2C7F6E9BB/image-size/large?v=v2&px=999 "Image SN.png")


author: Joseph Chung Yin
body: [@Gerardo Ramos](/t5/user/viewprofilepage/user-id/5587017)

Out of the box, it is not possible. You will need third party add-ons to extend the functionality that you want to achieve.

Take a look at ScriptRunner for Jira (their Behavior add-on.. It requires that you have Scriptrunner first and Behavior add-on is then free at no charge. You cannot have Behavior add-on without Scriptrunner for Jira)

**[https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=cloud&tab=overview)**

**[https://marketplace.atlassian.com/apps/1228522/behaviours-scriptrunner-for-jira-cloud?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1228522/behaviours-scriptrunner-for-jira-cloud?hosting=cloud&tab=overview)**

Using Behavior add-on, you can control field value setup based on other field's selection at issue creation time.

Hope this helps.

Best, Joseph


author: Gerardo Ramos
body: Thanks guys,  

Seems i have to much to learn but I have a question,  
I mean I just wanna make sure that I'm not totally wrong but is the behaivor of JIRA Mobile correct?

I will go deep into the Scrip Runner thing but is this normal how it send a notification cuz if we analize the situation is like the aplication is triggering an incident without check all the context or the information?   

thanks guys


author: Carlos Garcia Navarro
body: Hola [@Gerardo Ramos](/t5/user/viewprofilepage/user-id/5587017) ,

Bienvenido a la 'Community'! Is entiendo la pregunta correctamente, este otro post parece relacionado: <https://community.atlassian.com/t5/Jira-questions/Priority-values-need-to-show-up-based-on-the-custom-field/qaq-p/2359724>

comments: author: Gerardo Ramos
body: Hola Carlos muchas gracias por tu respuesta, parece que estoy en un problema o bueno eso veo puesto que el funcionamiento no es el esperado parece que ser?a algo a mejorar en JIRA puesto que lo que se menciona en el post se basa en el cambio de prioridad en base a una regla de automatizaci?n lo cual ya tengo implementado en mi sistema pero su funcionamiento no es el adecuado a ojos del usuario el incidente se cambi? su prioridad pero a nivel de sistema sigue siendo Low en este caso puesto que es la prioridad por default,   

todo esto lo identifico mediante la automatizacion de JIRA que me indica que un incidente ha sido creado con prioridad X, adicional mediante la APP JIRA mobile que precisamente es la que necesito me identifique la prioridad.  

lo que busco con todo esto es poder setear adecuadamente un on call schedule que me permita hacer escalaciones autom?ticas en base a prioridades y horarios.  

Tengo experiencia usando ServiceNow y precisamente a la hora de crear un incidente mientras se elige impacto y urgencia la prioridad cambia autom?ticamente antes de lanzar el incidente y en caso de este ser creado mediante Email se lanza como prioridad 4 lo cual esta bien, desafortunadamente no he podido replicar esto en JIRA


Tags: cloud

jira-cloud

jira-service-management

jira-service-management-cloud

mobile