Last friday was awesome. Leo Murillo and Carlos Fernandez, from Deiser,  were helping me out with the integration of Atlassian Jira in LiveTeamApp (my latest application for team productivity).  We spent the whole day learning about Jira integration and ended up with a nice spike containing all the information I need to develop a new version of LiveTeamApp supporting Jira. The task manager will read your Jira tasks and save the time spent back to Jira, while working with LiveTeamApp to make your current work visible in real time to your teammates.

Carlos Fernandez, Carlos Ble, Leo Murillo

Deiser is an amazing company, recently well-known for their expertise in Atlassian products and the great plugins they are building for them. Workload is one of them. If you need support on any Atlassian product, go for Deiser, these guys are experts indeed and they demonstrated that to me as we were coding together.

 

What surprised my a lot was that they spent the whole day with me just for the sake of collaboration. Just to help me to improve my application, making it more useful for Jira’s users. We worked in their nice office, had a great lunch and a very productive coding/hacking day. The passion for their work is energizing. I am very grateful to Deiser’s CEO, Guillermo Montoya for this nice gift, and of course to Carlos and Leo for their effort and kindness. Now some details on our work:

Integrating with Jira

At the beginning we tried OAuth as the authorization mechanism to make LiveTeamApp read Jira’s tasks and add time spent to them, through the REST API. But I wasn’t the easiest choice so we went for basic authentication with login/password. The authentication is sent in the http headers. This is the spike’s code to retrieve user tasks using Python and Flask and the Requests library:

@app.route("/jira/listTasks/")
def listJiraTasks(jiraHost):
   url = 'http://' + jiraHost
   url += '/rest/api/2/search?jql=assignee=currentUser()'
   url += ' and resolution=Unresolved'
   req = requests.get(url,  
      headers={'Authorization': 'Basic Y2FybG9zOmNhcmxvcw=='})
   return req.json()

The hash in the header (Y2FybG9zOmNhcmxvcw==), is the string “username:password” base64encoded.

And this is the code to add time spent to a task:

@app.route("/jira/updateTask/", methods=['POST'])
def updateJiraTask(jiraHost):
   url = 'http://' + jiraHost + '/rest/api/2/issue/TEST-3/worklog'
   req = requests.post(url,  
      headers={'Authorization': 'Basic Y2FybG9zOmNhcmxvcw==',
               'Content-Type': 'application/json'},
      data=simplejson.dumps({
          "comment":"Adding Worklog thru other app", 
          "started":"2013-01-12T10:30:18.932+0530",
          "timeSpent":"2d"
       }))
   return req.json()

At the beginning we tried to do everything from JavaScript, from LiveTeamApp’s client side, but due to restrictions with cross site scripting security in the browser we translated the request to the server side.

I don’t have a release date for this feature to be done but it will be soon. Get ready for LiveTeamApp, you Jira user 🙂

I hope to work with Deiser’s people again in the future, we had definitely a great time 😉