Skip to end of metadata
Go to start of metadata

Cprime Apps has been rebranded as Anova Apps. Please note the only effect is the company name - all of our products’ names, logos, functionalities, support, etc. is exactly the same. The new location to our documentation space is https://anovaapps.atlassian.net.

Availability

This routine is available starting with SIL Engine™ 1.1.

Syntax

raiseEvent(event_name, issue, user)

Description

Triggers an event to be processed by listeners.

Parameters

Parameter name

Type

Required

Description

event name

String

Yes

Name of the event to be triggered, as it appears in the Administration->Events section.

issue key

String

Yes

Key of the issue that will raise the event.

user name

String

Yes

User name of the user who will generate the event.

Return type

boolean (true/false)

A "true" return value means that the specified event was triggered successfully. A "false" value means that there was a problem and you should investigate this further by consulting the logs.

Example

Example 1

//Assuming we have already added the "Delete" event
raiseEvent("Delete", "PRJ-231", currentUser());

Returns "true" if the event was triggered for the issue PRJ-231 by the current user and "false" if the event wasn't triggered.

Example 2

//Assuming we have already added the "Delete" event
raiseEvent("Delete", key, "Admin");

Returns "true" if the event was triggered for the current issue by the user "Admin" and "false" if the event wasn't triggered.

See also

4 Comments

  1. Anonymous

    Is there a list of the event names ? "Delete", "Comment", etc.?

    1. Yes. You can find a list of all available events at Administration -> Events.

      Regards, 

      Florin.

  2. Anonymous

    in the Administration->Events of JIRA one may found "Issue Deleted" rather than "Delete". Is the example correct,

    1. The default event for a delete issue action is "Issue Deleted", but you may also create custom events.

      These examples assume that we have previously created a custom event called "Deleted", but the idea is that you can use any event listed under Administration->Events.

      Regards,

      Florin.