Это закодированный запрос. По умолчанию состояния 6/7 - это числа c значений состояний, хранящихся в ServiceNow.
Таким образом, «Разрешено» и «Закрыто» являются значениями «Отображение» (то, что видит конечный пользователь) и 6 / 7 - это числовое значение c, стоящее за этими отображаемыми значениями, чтобы облегчить доступ к ним при разработке.
Фактически, notClosedResolved/closedResolved
означает, что они будут использоваться при выполнении какой-либо формы запроса.
Например:
//The two variables storing the encoded queries.
var notClosedResolved = 'stateNOT IN6,7';;
var closedResolved = 'stateIN6, 7';
//The query being added to the GlideRecord, then queried.
var gr = new GlideRecord('incident');
gr.addEncodedQuery(notClosedResolved);
gr.query();
//If any tickets matching the query (Not closed or resolved) exist, then do whatever is in the while and update the record
while(gr.next()){
gr.short_description = 'Example - All non-closed/resolved incidents';
gr.update();
}
//The query being added to the GlideRecord, then queried.
var gr = new GlideRecord('incident');
gr.addEncodedQuery(closedResolved);
gr.query();
//If any tickets matching the query (Closed or resolved) exist, then do whatever is in the while and update the record
while(gr.next()){
gr.short_description = 'Example - All closed/resolved incidents';
gr.update();
}