Special Values

Special values are used within rules to reference values outside the issue, or to set specific values to aid in manipulating the issue.

EMAIL_IGNORE_GROUP

This allows you to check or uncheck the checkbox that sends notification with the EMAIL_CUSTOMER field on the add and the edit screens. Normally this is the Guest or Customer Role. Set to a value of 'Y' to set the value to checked, or to a value of 'N' to set a value of unchecked. Use a preupdate rule such as:

if (SCREEN_NAME='ADD' && STATUS='Fixed') {
  EMAIL_IGNORE_GROUP = 'Y';
}

Valid values are ’Y’ and ’N’. Note that the value may be in upper or lower case.

EXT_SITE_URL

This special value references and returns the value of the behavior setting named EXT_SITE_URL.

GENERATE_EMAIL

This allows you to check or uncheck the checkbox that governs notification on the add and the edit screens. Use a preupdate rule such as:

if (SCREEN_NAME='ADD' && CATEGORY='Undetermined') {
  GENERATE_EMAIL = 'N';
}

Valid values are ’Y’ and ’N’. Note that the value may be in upper or lower case.

SCREEN_LOAD

There are several occasions when load directive rules are executed:

  • When an add screen loads
  • When an edit screen loads
  • When the user clicks the Update & Continue button on the menubar of an edit screen.  This operation is fulfilled via an Ajax request to the server so no screen refresh occurs.

There are times when you want different rules processing to happen, especially if the Update & Continue button is clicked from an edit screen.  The SCREEN_NAME special value allows the rules programmer to differentiate between the add and the edit screens.  The SCREEN_LOAD special value allows the rules programmer to differentiate when the Update & Continue button is causing the issue to be loaded.  The SCREEN_NAME special value may have the value FULL or AJAX, with usage such as:

if (SCREEN_NAME='EDIT' && SCREEN_LOAD='FULL') {
  ... do something ...
};

or

if (SCREEN_NAME='EDIT' && SCREEN_LOAD='AJAX') {
  ... do something else ...
};

SCREEN_NAME

This has two possible values, ADD or EDIT. This allows you to define a rule that will only be executed on the Add or Edit screens. For example:

if (SCREEN_NAME='ADD' && STATUS='OPEN') {
   ....
}

will execute the rule, only if you are adding an issue and the status is OPEN.

SITE_URL

This special value references and returns the value of the behavior setting named SITE_URL.

SYSDATE

This provides a value of the current timestamp

SYSDAY

This provides the Date Value of the current time

USER

This references the current user

USER_ROLE

This references or sets the current user role. Setting the user role is only allowed under specific conditions:

  1. This will only work on the edit screen, not the add screen
  2. To set a new role to the current user, the current user must be able to adopt the new role. I.e., their user account must specify that they are allowed to adopt the new role as part of the user configuration.
  3. If the rule attempts to set a role to a role to which the user does not have permission, the role will be changed to the role identified by the behavior setting named LIMITED_USER_ROLE. Thus, you may still affect a role change to a user who has a single role defined, but this will typically be the Guest or Customer role.