Que hay incorrecto en esta JQL??

Nieves Garcia Sanz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 15, 2025

 

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

4 answers

4 accepted

1 vote
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

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

Nieves Garcia Sanz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 15, 2025

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,

 

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Solo para asegurarme, ¿estás en Server, Data Center o Cloud?

Nieves Garcia Sanz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 15, 2025

¿Cómo podría confirmar que opción es?

creo que Data Center

 

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Tu Jira se ve así?

Screenshot 2025-01-15 141158.png

(Este es Data Center, las opciones del menú deberían ser Tableros, Proyectos, Issues, Paneles, ...)

¿O así?

Screenshot 2025-01-15 140509.png

(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.

 

Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

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!

Like Tessa Tuteleers likes this
1 vote
Answer accepted
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

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)"))

  

0 votes
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Hi @Nieves Garcia Sanz

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

 

0 votes
Answer accepted
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events