Rules

What are rules?

Rules is where you automate the release notes generation process. In essence, rules are a collection of ‘Actions’ tied together by a ‘Trigger’. Each rule can have one trigger & multiple actions. There can be multiple rules in in-project as well as on the cross-project screen.

Columns on the Rules page

  • Trigger - This displays what trigger is selected in the rule

  • Name - Name of the Rule

  • Action - It shows the actions within the rules (indicated with icons)

  • Last used - Date when the rule was used

  • Enabled - Whether the rule is Enabled/Disabled

  • Last modified by - User who modified the rule

  • Last modified date - Date when the rule was last modified

You can decide what all colums should be visible for you on the rules page from the columns setting image-20241121-085028.png option.

 

Rule1.png

Create a rule

Click on ‘Create’ on Rules tab and below are the different fields you will see on Create Rule page -

rule3.png

Rule name

Write the name of your rule. This is only for record purposes and is not visible to end users of release notes.

Enabled/Disabled

With this flag you can enable/disable the rule

Run Rule as

This field shows the options depending on your settings done in Rules Configurations. Read the below section for more details.

Background

Apps on the cloud version of Jira are a bit different from server/DC variants. Cloud apps have a peculiar user App user on the instances where they are installed. This app user has access to all Jira projects & thus potentially this can be exploited (within the context of ARNR) to bypass project restrictions and fetch issues from Jira that otherwise one would not have access to.

To prevent such a possibility, we are introducing a new parameter for rules called Run rule as.

Configuration

Run rule as.png

As Jira admin, navigate to Jira Apps menu from Jira settings >> Configurations for Automated Release Notes & Reports >> Rules tab. This is where an option to turn on Allow rules to be run by App user option is available.

By default, Allow rules to be run by App user is turned off for all the instances & we DO NOT recommend turning it on without understanding the implications

If it is turned on, then ARNR end users can potentially create templates to fetch information that is not visible to them via Jira due to their Jira permissions. If at all, this feature is required, turn it on temporarily until the relevant rule is created & then turn it off.

When turned on, the Jira admin can also configure the default value to be either Creator of rule or App user.

Impact

Imagine, if Alex created a rule in ARNR some time ago & then after a while left the organization, thus his Jira account was deactivated/deleted. Now if the rule was configured to be run by Creator of rule then it will fail to fetch Jira issues because Alex doesn’t have access to Jira anymore.

Trigger

Trigeers are to decide whether your rule runs manually for automatically based on specific condistiins.

Notify success or failure

Background

This setting enables you to set up email notifications that are sent to the rule owner/admin with the rule execution statuses. So, for any reason if the the rule fails, relevant users and informed and they can take the relevant actions.

notifications.png

Conndition for sending notifications

Clicking on Notify on success/failure field below dropdown options are available.

Options

Action when option selected

Notify when at least one rule action fails to execute

Only when at least one rule action fails to execute, the selected users will be notified

Notify for every rule execution

The selected users will be notified every time the rule is executed - successfully or unsuccessfully

Do not notify

No users will be notified

Select users

  • Once you have selected the appropriate option, you can add relevant email addresses to Select users field.

  • If the value of Notify on success/failure field is set to - Do not notify, user selector field will be disabled.

  • For every new rule, the default value for Notify on success/failure field will be set to Notify when at least one rule action fails to execute.

Click on Save and the rule is now created! Now you can add actions, these actions are executed in the sequence of the order you have organized them. For eg. There is rule with actions like Email, Confluence, LinkedIn announcements, and publish-to-release notes. Based on their order rules are executed. You can reorder them by simple drag and drop.

Important points to note

Rules by themselves don’t do much. Know more about Triggers Actions

Rules can only be created at the local & cross-project level.

  • An in-project rule can only be used, edited, or deleted in the project in which it is created AND

  • A cross-project rule can only be used, edited, or deleted from the cross-project screen.

In-project vs Cross-project

Do note that, actions can only be added after the rule is saved.