YouTrack Standalone 2017.2 Help

Search

Workflow module Search from package @jetbrains/youtrack-scripting-api

Module containing facilities to query YouTrack issues.

Module functions

 

search

static search(folder, query, user)

Returns issues matching a query. In case no explicit sorting is specified, order of the resulting issues set should beconsidered random.

var search = require('@jetbrains/youtrack-scripting-api/search'); ... var query = 'for: me State: {In Progress} issue id: -' + issue.id; var inProgress = search.search(issue.project, query, ctx.currentUser); if (inProgress.isNotEmpty()) { // Do smth with a found set of issues. }

Parameters:

NameTypeDescription
folder WatchFolder a project, an issue tag or a saved query to search in context of.If omitted, all issues will be searched which is an equivalent to searching via UI with Everything set as a context.
query string YouTrack search query.
user User user to execute the query under. If not specified, current user will be taken.

 

Last modified: 9 August 2017