JJupin - Live Fields: How can I launch the initial script of a project when I'm not located in an issue?

JJupin - Live Fields: How can I launch the initial script of a project when I'm not located in an issue.

 

Very often people launch  issue creation from every part of JIRA, not only when are located over an issue. For example, if I lauch issue creation from a Dashboard or Filter screen, initial LF script is not activated and scripts don't work.

How can I make for avoid that?

Thanks in advance

 

Begoña

1 answer

1 accepted

This widget could not be displayed.

Hi,

Actually, this isn't supposed to happen: live fields should launch on any create screen. Do you call any instant hook in the main script? (mainly, there are the ones that work on create screens).

 

Best Regards,

Alexandra

My initial script is:

// Seleccionar servicio catálogo (21500)
lfWatch( "customfield_21500", {"customfield_21500","project"}, "/datos_apl/jira/silprograms/proyectos_soporte/busqueda_serviciocatalogo/completa_serviciocatalogo_lf.sil");
// Seleccionar grupo soporte (20900)
lfWatch("customfield_20900",{"customfield_20900","customfield_14214","project"},"/datos_apl/jira/silprograms/proyectos_soporte/busqueda_gruposoporte/completa_gruposoporte_lf.sil");
//Seleccionar técnico soporte (20901)
lfWatch("customfield_20901",{"customfield_20901"},"/datos_apl/jira/silprograms/proyectos_soporte/busqueda_tecnicosoporte/completa_tecnicosoporte_lf.sil");
// Al modificar el grupo de soporte (20900), limpiar el técnico (20901)
lfWatch("customfield_20900", {"customfield_20900","customfield_20901"}, "/datos_apl/jira/silprograms/proyectos_soporte/busqueda_tecnicosoporte/limpia_tecnicosoporte.sil");

On edit screen, lfWatch works just fine. It may work on create issues from an existing issue as well, since it has some data present on screen.
However, for create screen, we recommend using lfInstantHook.
Try to add this to your script:

// Seleccionar servicio catálogo (21500)
lfInstantHook({"customfield_21500","project"}, "/datos_apl/jira/silprograms/proyectos_soporte/busqueda_serviciocatalogo/completa_serviciocatalogo_lf.sil");
// Seleccionar grupo soporte (20900)
lfInstantHook({"customfield_20900","customfield_14214","project"},"/datos_apl/jira/silprograms/proyectos_soporte/busqueda_gruposoporte/completa_gruposoporte_lf.sil");
//Seleccionar técnico soporte (20901)
lfInstantHook({"customfield_20901"},"/datos_apl/jira/silprograms/proyectos_soporte/busqueda_tecnicosoporte/completa_tecnicosoporte_lf.sil");
// Al modificar el grupo de soporte (20900), limpiar el técnico (20901)
lfInstantHook({"customfield_20900","customfield_20901"}, "/datos_apl/jira/silprograms/proyectos_soporte/busqueda_tecnicosoporte/limpia_tecnicosoporte.sil");

It should do the trick. smile

Thanks! It works for me!!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

150 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you