Redmine Automation

Rules that take care of the recurring work

AlphaNodes online training, about 5 minutes

What the plugin does

If x is true, then do y. The Automation plugin runs rules on your Redmine data, either when something happens or on a schedule.

  • Escalate issues nobody touched for days, close issues that wait too long
  • Repeat issues and time entries on a schedule, bring issues back on a date
  • Notify people and other systems: mail, Slack, Matrix, webhooks

Anatomy of a rule

A rule with trigger, conditions and actions

Three parts of every rule

  • Trigger: when the rule is evaluated, the event of saving an entity, or a schedule
  • Conditions: the filters of the entity, the same you know from the issue list
  • Actions: what happens, from changing a status to calling a webhook

The more precise the conditions, the fewer records a rule touches. Test with a small scope first.

Event based or scheduled

Event triggers such as save, delete and login compared with scheduled triggers using intervals

How a rule is triggered

  • Event rules run on every save of the entity and check the current state, not what changed
  • Scheduled rules run at intervals in cron syntax, for example every day at 8 am
  • Changes made by a rule do not trigger rules again, so there are no endless loops
  • Event rules are cheaper for the server than scheduled ones, prefer them

What can be automated

Issues, projects and spent time with the Automation bundle, users, DB entries, passwords, helpdesk and wiki pages with further plugins

Actions, a selection

  • Issue fields: status, assignee, priority, tracker, due date, % done, custom values, tags, watchers
  • Communication: comment, send mail, send mail by role, Slack and Matrix messages, webhook
  • Create issue, create project, log time, delete attachments, delete data set
  • System: rake command, shell command, Ansible playbook, stop, disable rule

Typical rules

Escalation, auto-close, issue repeats and webhook as four typical rules

Built in from the start

  • Issue repeats: an open template issue with a schedule creates copies, for example monthly tasks, until the schedule is removed or the template is closed
  • Time entry repeats and issue resubmission on a date
  • Three cleanup jobs active by default under the tab Rules: unattached files, old log entries, expired tokens
  • The Health Check tab links to an endpoint that reports whether the cron job runs and the bot user is set up

Who does what

  • Only administrators create and manage rules, under Administration, Automation, after switching on Activate custom rules
  • The automation bot is a user with administrator rights that executes the actions, you choose it in the plugin settings
  • Changes, errors and scheduled runs are written to the log of the Reporting plugin

In short

Describe the routine once as trigger, conditions and actions, then let the bot do it every time.

Before you start

  • Identify the recurring tasks and the problem areas together with the team
  • Write the rule down as a flow first, then build it with narrow conditions
  • A rule that creates something needs a condition that stops being true after the first run
  • Requires the Reporting plugin, both are part of the Enterprise+ bundle

See it live

Try the plugin in our online demo

alphanodes.com/redmine-demo

Product page · Back to online training

© AlphaNodes GmbH, all rights reserved