Lavagna HELP
  1. 1About
  2. 2Install
    1. 2.1Database
      1. 2.1.1MySql
      2. 2.1.2MariaDB
      3. 2.1.3PostgreSQL
      4. 2.1.4HSQLDB
    2. 2.2Configuration
      1. 2.2.1Self contained
      2. 2.2.2Servlet container
    3. 2.3Setup
      1. 2.3.1Step 1, Base url or import
      2. 2.3.2Step 2, Login provider configuration
        1. 2.3.2.1Password provider
        2. 2.3.2.2Demo provider
        3. 2.3.2.3Ldap provider
        4. 2.3.2.4Oauth provider
        5. 2.3.2.5Preconfigured oauth providers
        6. 2.3.2.6Custom oauth providers
      3. 2.3.3Step 3 Insert administator
      4. 2.3.4Step 4 Confirm
  3. 3Use Lavagna
    1. 3.1Project
      1. 3.1.1Create Project
      2. 3.1.2Project settings
      3. 3.1.3Edit Project
      4. 3.1.4Archive Project
      5. 3.1.5Delete Project
    2. 3.2Board
      1. 3.2.1Create Board
      2. 3.2.2Edit Board
      3. 3.2.3Archive Board
      4. 3.2.4Delete Board
    3. 3.3Columns
      1. 3.3.1Create a new column
      2. 3.3.2Special columns
        1. 3.3.2.1Access the backlog
        2. 3.3.2.2Access the archive
        3. 3.3.2.3Access the trash
      3. 3.3.3Change the name of a column
      4. 3.3.4Column menu
      5. 3.3.5Change status color
    4. 3.4Card
      1. 3.4.1Create a new card
      2. 3.4.2Access the card menu in a board
      3. 3.4.3Work with a card
        1. 3.4.3.1Change the card title
        2. 3.4.3.2Change the card description
        3. 3.4.3.3Add a label
        4. 3.4.3.4Move the card
        5. 3.4.3.5Change the card due date
        6. 3.4.3.6Assign the card to a milestone
        7. 3.4.3.7Work with people
          1. 3.4.3.7.1Assign the card to a user
          2. 3.4.3.7.2Personal operations
        8. 3.4.3.8Work with action lists
        9. 3.4.3.9Attachments
        10. 3.4.3.10Activity
    5. 3.5Labels
      1. 3.5.1Use labels
      2. 3.5.2Manage labels
        1. 3.5.2.1Create a label
        2. 3.5.2.2Edit a label
        3. 3.5.2.3Delete a label
    6. 3.6Milestones
      1. 3.6.1Use milestones
        1. 3.6.1.1Close a milestone
      2. 3.6.2Manage milestones
        1. 3.6.2.1Create a new milestone
        2. 3.6.2.2Edit a milestone
    7. 3.7Search
      1. 3.7.1Filters
        1. 3.7.1.1label
        2. 3.7.1.2to
        3. 3.7.1.3by
        4. 3.7.1.4created
        5. 3.7.1.5watched
        6. 3.7.1.6updated
        7. 3.7.1.7due
        8. 3.7.1.8updated by
        9. 3.7.1.9milestone
        10. 3.7.1.10status
        11. 3.7.1.11location
        12. 3.7.1.12Free text search
      2. 3.7.2Single board search
      3. 3.7.3Global and project specific search
    8. 3.8Operations on multiple cards
      1. 3.8.1Select cards
      2. 3.8.2Operations
    9. 3.9Calendars
    10. 3.10Project Statistics
      1. 3.10.1Filtering
      2. 3.10.2Basic statistics
      3. 3.10.3Chart statistics
    11. 3.11Import data from external sources
      1. 3.11.1Trello
        1. 3.11.1.1Requirements
        2. 3.11.1.2Import data
    12. 3.12Create tickets via E-mail
      1. 3.12.1Manage ticket E-mail configuration
        1. 3.12.1.1Create mail configuration
        2. 3.12.1.2Add ticket configuration
        3. 3.12.1.3Edit configurations
        4. 3.12.1.4Enable/Disable configuration
        5. 3.12.1.5Delete configuration
      2. 3.12.2Support localized E-Mail notifications
    13. 3.13Manage profile
      1. 3.13.1Profile
      2. 3.13.2Calendar access
      3. 3.13.3Change password
  4. 4Administration
    1. 4.1Configuration parameters
    2. 4.2Login
      1. 4.2.1Anonymous user access
      2. 4.2.2Login providers
        1. 4.2.2.1Demo
        2. 4.2.2.2Password (internal provider)
        3. 4.2.2.3Ldap
        4. 4.2.2.4Oauth
        5. 4.2.2.5Preconfigured oauth providers
        6. 4.2.2.6Configurable oauth providers
    3. 4.3Users
      1. 4.3.1Add User
      2. 4.3.2Import users from a file
      3. 4.3.3User actions
    4. 4.4Access control
      1. 4.4.1Global and Project Roles
        1. 4.4.1.1Default roles
        2. 4.4.1.2Use roles for effective access control
      2. 4.4.2Permissions
      3. 4.4.3Manage roles
        1. 4.4.3.1Add a new role
        2. 4.4.3.2Edit a role
        3. 4.4.3.3Delete a role
        4. 4.4.3.4Edit project role
    5. 4.5Mail notifications
    6. 4.6Import/Export data
      1. 4.6.1Exporting
      2. 4.6.2Importing
    7. 4.7External integrations
      1. 4.7.1Script creation
        1. 4.7.1.1Supported events
      2. 4.7.2Script example
      3. 4.7.3Manage the integration

4.7External integrations

You can add customized javascript programs to react on application events.

It can be useful for example to notify an external system, like a slack channel.

4.7.1Script creation

To create a new integration, press the plus button. It will open the following modal window:

create new integration modal window

Insert the name, a description, configuration parameters (will be available in the global configuration variable) and the script.

The script receive the following global variables:

  • log: an instance of a Logger
  • GSON: an instance of Gson
  • restTemplate: an instance of a RestTemplate
  • eventName: a string with the current triggered event. See below the values
  • project: the project name (string)
  • user: an instance of io.lavagna.model.apihook.User: the user that triggered the event
  • configuration: a map containing configuration values
  • data: a map containing additional values

4.7.1.1Supported events

  • CREATE_PROJECT
  • UPDATE_PROJECT
  • CREATE_BOARD, additional global variables:
    • board: short name of the board (string)
  • UPDATE_BOARD, additional global variables:
    • board: short name of the board (string)
  • CREATE_COLUMN, additional global variables:
    • board: short name of the board (string)
    • columnName: column name (string)
  • UPDATE_COLUMN, additional global variables:
    • board: short name of the board (string)
    • previous: previous column (io.lavagna.model.apihook.Column)
    • updated: current column (io.lavagna.model.apihook.Column)
  • CREATE_CARD, additional global variables:
    • board: short name of the board (string)
    • card: newly created card (io.lavagna.model.apihook.Card)
  • UPDATE_CARD, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • previous: previous name (string)
    • updated: current name (string)
  • UPDATE_CARD_POSITION, additional global variables:
    • board: short name of the board (string)
    • affectedCards: the cards that are moved (list of io.lavagna.model.apihook.Card)
    • from: the source column (io.lavagna.model.apihook.Column)
    • to: the destination column (io.lavagna.model.apihook.Column)
  • UPDATE_DESCRIPTION, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • previous: previous card data (io.lavagna.model.apihook.Card)
    • updated: current card data (io.lavagna.model.apihook.Card)
  • CREATE_COMMENT, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • comment: the comment (io.lavagna.model.apihook.CardData)
  • UPDATE_COMMENT, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • previous: previous comment (io.lavagna.model.apihook.CardData)
    • updated: current comment (io.lavagna.model.apihook.CardData)
  • DELETE_COMMENT, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • comment: the deleted comment (io.lavagna.model.apihook.CardData)
  • UNDO_DELETE_COMMENT, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • comment: the undeleted comment (io.lavagna.model.apihook.CardData)
  • CREATE_ACTION_LIST, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
  • DELETE_ACTION_LIST, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
  • UNDO_DELETE_ACTION_LIST, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
  • UPDATE_ACTION_LIST, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • previous: previous name of the list (string)
    • updated: current name of the list (string)
  • CREATE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
    • actionItem: the text of the item (string)
  • DELETE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
    • actionItem: the text of the item (string)
  • UNDO_DELETE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
    • actionItem: the text of the item (string)
  • TOGGLE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
    • actionItem: the text of the item (string)
    • toggled: the state of the action item (boolean)
  • UPDATE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionList: the name of the action list (string)
    • previous: previous text (string)
    • updated: current text (string)
  • MOVE_ACTION_ITEM, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • actionItem: the text of the item (string)
    • from: the name of the action list (string)
    • to: the name of the action list (string)
  • CREATE_FILE, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • files: the list of uploaded files (list of string)
  • DELETE_FILE, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • file: the deleted file (string)
  • UNDO_DELETE_FILE, additional global variables:
    • board: short name of the board (string)
    • card: the card (io.lavagna.model.apihook.Card)
    • file: the undeleted file (string)
  • ADD_LABEL_VALUE_TO_CARD, additional global variables:
    • board: short name of the board (string)
    • label: the label (io.lavagna.model.apihook.Label)
    • affectedCards: the cards (list of io.lavagna.model.apihook.Card)
  • UPDATE_LABEL_VALUE, additional global variables:
    • board: short name of the board (string)
    • label: the label (io.lavagna.model.apihook.Label)
    • affectedCards: the cards (list of io.lavagna.model.apihook.Card)
  • REMOVE_LABEL_VALUE, additional global variables:
    • board: short name of the board (string)
    • label: the label (io.lavagna.model.apihook.Label)
    • affectedCards: the cards (list of io.lavagna.model.apihook.Card)

4.7.2Script example

The following script create post on a slack channel:

log.warn("eventName: " + eventName + ", project: " + project + ", 
    data: " + GSON.toJson(data));
var userName = user.displayName || user.username;

function formatCard(card) {
  return card.boardShortName + '-' + card.sequence + ' "' + card.name + '" ' + card.url;
}

function formatColumn(column) {
  return column.name;
}

var supportedEvents = {
  CREATE_CARD: function() {
    return {text: 'User "' + userName+'" has created the card: ' + formatCard(data.card)};
  },
  UPDATE_CARD_POSITION: function() {
    var moreThanOne = data.affectedCards.length > 1;
    var cardText = 'card'+(moreThanOne ? 's' : '');
    for(var i = 0; i < data.affectedCards.length; i++) {
      cardText += ' '+formatCard(data.affectedCards[i]);
    }
    return {text: 'User "' + userName+'" moved the ' + cardText + 
        ' from column ' + formatColumn(data.from) + ' to column ' + formatColumn(data.to)};
  },
  CREATE_COMMENT: function() {
    return {text: 'User "' + userName+'" has posted the comment: ' 
        +   data.comment.content  + ' in the card ' + formatCard(data.card)};
  },
  UPDATE_COMMENT: function() {
    return {text: 'User "' + userName+'" has updated a comment to' 
        + data.updated +' in the card ' + formatCard(data.card)}
  },
  UPDATE_DESCRIPTION: function() {
    return {text: 'User "' + userName+'" has updated the card description to ' 
        + data.updated.content +' in the card ' + formatCard(data.card)}
  }
};

if(supportedEvents[eventName]) {
  var payload = supportedEvents[eventName]();
  if(payload) {
    restTemplate.postForLocation('https://hooks.slack.com/services/.../.../...', payload);
  }
}

We check if the event is handled by our script by using a map of string, functions.
If the event is present in the map, we execute the function.

4.7.3Manage the integration

All the integrations will be listed as shown below.

manage integrations

Clicking on the button, will disable the script, for re-enable it, click on .

You can edit () and delete () the integration too.