project = DMESP AND "Sponsor area" in (ADM, FIN) AND resolution in (Unresolved) AND "Initiative Link" in (issueFunction("project in ("PPM - PORTFOLIO") AND "Sponsor area" in (ADM, FIN) AND country in (SPAIN) and fixVersion in (QBR25_01, QBR25_02, QBR25_03, QBR25_04)")
Intento obtener los jiras del proyecto DMESP, que tengan asociado en campo "Initiative LInk" un jira del proyecto PPM con esas condiciones
La respuesta que me da al ejecutarla:
Error en la consulta JQL: Se esperaba ')' o ',' pero se obtuvo 'PPM'. (línea 1, caracter 135)
Gracias
El error ocurre porque JQL no admite de forma nativa consultas anidadas o funciones avanzadas como issueFunction
sin complementos específicos como ScriptRunner.
Veo que estás en Cloud, ¿es posible que te hayas migrado recientemente?
En Server/DC, la función issueFunction
funcionaría de manera directa en consultas JQL como esta:
issueFunction in linkedIssuesOf("status = Open", "blocks")
Puedes encontrar la información aquí.
Sin embargo, en Cloud necesitas usar la búsqueda mejorada de ScriptRunner (no funciona directamente en la barra avanzada de JQL).
Debes crear el filtro en la búsqueda mejorada (que se encuentra en la sección de aplicaciones), luego guardar el filtro y sincronizarlo. ScriptRunner cambiará el filtro para usar claves de problemas específicas basadas en tu consulta, de modo que puedas usar el filtro en paneles, etc.
Encuentra la información aquí.
Espero que esto te ayude. Por favor, avísame si no logras hacerlo funcionar.
(Disculpa si mi lenguaje no es claro, usé un traductor para adaptar esto del inglés).
Saludos,
Tessa
Hola Tessa,
Mil gracias por tu rápida respuesta,
He probado a ejecutar,
project = DMESP AND "Sponsor area" in (ADM, FIN) AND resolution = Unresolved AND issueFunction in linkedIssuesOf("project = \"PPM - PORTFOLIO\" AND \"Sponsor area\" in (ADM, FIN) AND country = SPAIN and fixVersion in (QBR25_01, QBR25_02, QBR25_03, QBR25_04)", "Initiative Link")
COmo un filtro nuevo de busqueda,
La JQL no me indica que es incorrecta, pero no me devuelve ningun registro, y si debería.
No entiendo bien donde puedo encontrar la opcion de ScriptRunner que comentas. No veo la opcion de Aplicaciones en mi menu de Jira,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solo para asegurarme, ¿estás en Server, Data Center o Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
¿Cómo podría confirmar que opción es?
creo que Data Center
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tu Jira se ve así?
(Este es Data Center, las opciones del menú deberían ser Tableros, Proyectos, Issues, Paneles, ...)
¿O así?
(Este es Cloud, las opciones del menú deberían ser Proyectos, Filtros, Paneles, Equipos, ...)
La URL debería tener el formato xxx.atlassian.net/jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As @Tessa Tuteleers says, if this is a data center instance. Also the ScriptRunner app behaves in a different way and you should reference this documentation, which also has video tutorials - https://docs.adaptavist.com/sr4js/latest/features/jql-functions/jql-functions-tutorial
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nieves Garcia Sanz Welcome to the community!
Could you please try the JQL below?
project = DMESP AND "Sponsor area" in (ADM, FIN) AND resolution = Unresolved AND "Initiative Link" in (issueFunction in linkedIssuesOf("project = PPM AND \"Sponsor area\" in (ADM, FIN) AND country = SPAIN and fixVersion in (QBR25_01, QBR25_02, QBR25_03, QBR25_04)"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your JQL Query is missing closing brackets at the end, which is why you are getting the error message.
Please modify your code to:-
project = DMESP AND "Sponsor area" in (ADM, FIN) AND resolution in (Unresolved) AND "Initiative Link" in (issueFunction("project in ("PPM - PORTFOLIO") AND "Sponsor area" in (ADM, FIN) AND country in (SPAIN) and fixVersion in (QBR25_01, QBR25_02, QBR25_03, QBR25_04)"))
and rerun the test to see what the outcome is.
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.
Hi @Nieves Garcia Sanz , welcome to the Atlassian Community and thanks for your question. I added the tag of scriptrunner because it looks like you're using ScriptRunner Enhanced Search JQL Functions.
Please reference the ScriptRunner documentation for help with this. https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/scriptrunner-enhanced-search-jql-queries/tips-for-writing-jql-queries
I think you haven't configured correctly the issueFunction part.
Here are some examples to help you - https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/scriptrunner-enhanced-search-jql-functions/links-and-relationships
I will signpost you here for now, knowing someone else may comment here to help you correct the JQL syntax.
Best wishes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.