Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

327
Vistas
How to use external scripts e.g. jquery for YouTrack Workflow scripts

I want to clean the comments from youtrack by scheduler in a for Each loop with:

action: (ctx) => {
    var issue = ctx.issue;
    issue.comments.added.forEach(function(comment) {
   
    // https://stackoverflow.com/questions/822452/strip-html-from-text-javascript
    comment.text = jQuery(comment.text).text();
      
    });
  },

But I get the error: jQuery is not defined.

How can I include jQuery in the script to use it to clean the comment from HTML tags.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It is not possible to use jQuery inside of a workflow script. Still, you can create a helper function that does the trick:

function cleanComment(text) {
  return text.replace(/(<([^>]+)>)/gi, '')
}

and use it inside of the action part of the rule

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda