Giter Club home page Giter Club logo

asana-hipchat's Introduction

asana-hipchat

Here you'll find a script that pushes changes from an Asana workspace to a HipChat room.

This script was created during our work on hikewith.me.

Thanks goes out to HipChat and Ajimix for their libraries.

notification features

  • new workspace has been created
  • new project has been created
  • new task has been created
    • new task
  • task changes
    • assigned
    • changed task
    • completed
    • completed task
    • due date changed
    • task informations changed (due, name ...)
    • changed task

planed feature

  • notifications on task comments
  • send creator on new workspace, project

installation

dependencies

  • php5-sqlite

      # apt-get install php5-sqlite
    

script installation

$ git clone https://github.com/edi-design/asana-hipchat.git asana_hipchat
$ cd asana_hipchat/ext-lib
$ wget https://raw.github.com/ajimix/asana-api-php-class/master/asana.php
$ wget https://raw2.github.com/hipchat/hipchat-php/master/src/HipChat/HipChat.php
$ cd ../config
$ cp config.example.php config.php
$ vi config.php

Edit the config.php according to your asana and hipchat installation. The following params need to be set.

/**
 * Asana configuration
 */
// api key
define('ASANA_API_KEY', 'asana_api_key_here');

// if workspace id is empty, it will check all workspaces
/**
 * @todo implement this feature
 */
define('ASANA_WORKSPACE_ID', 'asana_workspace_id_here');


/**
 * hipchat configuration
 */
// api_key
define('HIPCHAT_API_KEY', 'hipchat_api_key_here');

// room_id
define('HIPCHAT_API_ROOM', 0000);

// turn notifications on and off
define('HIPCHAT_NOTIFICATIONS', true);

// hipchat name of notifier
define('HIPCHAT_NOTIFIER', 'Asana');


/**
 * script configuration
 */
define('SQLITE_DATA_FILE', BASE_DIR . '/db/asana.sqlite');

run script

  • simple one-time run

      $ php asana.php 
    
  • cron script every 5 minutes

      $ crontab -e
      */5  *    *    *    *  /usr/bin/php /path/to/script/asana.php
    

asana-hipchat's People

Contributors

cweems avatar edi-design avatar michaelx avatar whockey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

asana-hipchat's Issues

Fatal error

I am getting the following

ben@Canary008:~/asana_hipchat$ php asana.php
PHP Fatal error:  Uncaught exception 'PDOException' with message 'could not find driver' in /home/ben/asana_hipchat/lib/AsanaHipchat.php:157
Stack trace:
#0 /home/ben/asana_hipchat/lib/AsanaHipchat.php(157): PDO->__construct('sqlite:/home/be...')
#1 /home/ben/asana_hipchat/asana.php(39): AsanaHipchat->run()
#2 {main}
  thrown in /home/ben/asana_hipchat/lib/AsanaHipchat.php on line 157

asana.php missing in ext-lib

Not sure where to post this question, so I filed an issue. Let me know if you need any more info, really want to use this integration :)

Getting this error when I run:
php asana.php

Fatal error: require_once(): Failed opening required '/Users/mattw/asana_hipchat/ext-lib/asana.php' (include_path='.:') in /Users/mattw/asana_hipchat/asana.php on line 21

Version of PHP:
PHP 5.5.14 (cli) (built: Sep 9 2014 19:09:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
mattw-mba-2:asana_hipchat mattw$

Version of Sqlite:
SQLite version 3.8.5 2014-08-15 22:37:57

Don't show changes of completed tasks

Don't show changes of completed tasks. Only show future changes when the task has been re-opened.

Example of current implementation:

The following task has been completed.

✓ Task XY (due on not set, →)

The following task has been changed.

▢ Task XY (due on not set, →)

Field [ creator ] was changed from "" to "".

5min delay before push "new X" notification

Asana creates the new element (task, project, workspace) as soon as you press the new button.
This could cause empty notifications, if we check at this moment but you are not ready entering the task details.

show subtasks

If i create subtasks for a task, i would like to see them monitored as well.

Add assignee to completed tasks

Add "was assigned to ".

Example:
✓ Update footer copyright (#Website, due on 2014-02-28, was assigned to Michael Xander, →)

Wait X minutes until posting a new task

Wait X (configurable) minutes until posting the creation of a new task to ensure it has been completely entered.

Currently new tasks are often time instantly followed by a change notification.

if creation_date !< 10m

Comments are pushing a mistakenly [ creator ] update

When comments or attachments are added to a task, the script pushes a mistakenly "field [ creator ]" update. If at least two followers exist, the non-creator gets posted as creator.

Example

Jon is the creator of the task, Amy follows it too. Jon writes a comment. The following happens:

The following task has been changed.
▢ Task title
Field [ creator ] was changed from "Jon" to "Amy".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.