How can I implement a time-controlled filter in a YouTrack app with TypeScript?

Is it possible to run a filter via a cronjob in Typescript with a YouTrack App?

0
3 comments

Hi Sentuerkemircan,

YouTrack apps let you add various modules including on-schedule rule workflows. However, your task might be more complex than that. Can you please describe in more detail what kind of filter you'd like to implement?

0

Hi Julia Bernikova,

I created a feature where you can filter by due date, assignee, etc. through the application on the interface. It then sends me an email with the filter content. I want it to filter even when I have closed the website, so via a cronjob

0

Hi Sentuerkemircan,

It seems that a on-schedule rule is a perfect fit then. This rule is designed to search for issues matching a certain filter and then process them one by one. To have it only run once, change the code so that there's just one issue matching the filter (a so-called “anchor issue”) like this:

exports.rule = entities.Issue.onSchedule({
  title: 'Filtering content on schedule',
  search: '#DEMO-1', // The anchor issue
  cron: '0 0 10 ? * MON-FRI', // The schedule
  action: (ctx) => {
      // Triggering the logic for content filtering 
  }
});
0

Please sign in to leave a comment.