     $scope.issues = data.issues
 
 
+  ###
+   show fail message.
+  ###
   loadIssuesError = () ->
     $message.toast 'Failed to load issues'
 
 
+  ###
+   on project selection change, load issue on the project.
+  ###
   $scope.onProjectChange = ->
     loadIssues()
 

    $message.toast "Load Project Failed."


  loadIssues = ->
    url = $scope.selectedProject.account.url
    apiKey = $scope.selectedProject.account.apiKey

    $redmine(url, apiKey).issues.getOnProject(projectId, loadIssuesSuccess, loadIssuesError)


  ###
   on loading success, update issue list
  ###
  loadIssuesSuccess = (data) ->
    url = $scope.selectedProject.account.url
    sameUrlTickets = (ticket for ticket in $scope.tickets when ticket.url is url)
