Version 12, last updated by Rob Chekaluk at June 17, 2010 14:30 UTC

Every space has a Stream tab which displays the events generated in that space. Your events might also appear in this page depending on the receiver_type and event_filters methods of your tool

You can add events that show in the Stream tab. Each type of event has an icon, a type name, and formats (decorators) for the different places where it shows in the system as an alert.

Every event is linked to a URL where you can see more details about the event. For example, a commit event links to a changeset diff, and a message event links to the message.

The three main formats for events are the HTML, Plain and RSS

This wiki page will contain specifications and recommendations for events formats:

 

Stream Tab

The Stream Page uses the Html decorator, which is also used in  real time emails (html version) and in summary emails (html version). You should pay special attention to the following methods to define how your event will render in the stream page.

Type and Icon: You can define the text for the type and the icon that will be used in the Stream page by adding an object_name and icon method to your decorator.

Operation Verb: Next to the author of the event, you will generally find an operation verb like "updated", "destroyed", "edited", etc. Existing event_types already have a verb associated with it (you can see them in @@related_verbs hash at app/models/event.rb). However, if you created a new event_type for your events, you should add an operation_verb method to your decorator.

Small Description: The small description next to the operation verb is usually retrieved from the related object of the event. The decorator will call the pretty_name method of your related object. If you want, you can override the pretty_name method of you decorator so that it does not call the related object method with the same name.

 

Email alerts

Subject Format:

"[space.name] plain_dec.title"

E.g.: "[Breakout] Wiki Page ‘My Wiki' created"
Note: You should use a small title. You should not include the user that performed the action, as that is shown in the From address.

From:

User that performed the action
"user.name <space.email>"
E.g.: "Andy Singleton <breakout@alerts.assembla.com>"

Body:

The body contains a default content (which you can see in UserNotify#formatted_event) and a custom content that you should edit in the body method of Html and Plain decorators.

Default Content:

First Line: [type] alert by <user.name> in space <space.name> ( reply ABOVE this line )
Eg.: Ticket alert by Andy Singleton in space Breakout ( reply ABOVE this line)

\**********************************************/
Custom Body
\*********************************************/
[More details]
Follow all team member project activity or change your alert preferences at [Stream Link]

More Information:

If you want to learn about Tools and Email Alerts, read Email gateway

 

RSS

The Stream page has an RSS view too. So, your new events need to provide an RSS decorator. We recommend you to create your RSS decorator as a subclass of your HTML decorator.

Your decorator should provide the following methods: title, body, description, color (optional, to set a background color for RSS readers that support styles).