Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

333
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!