Commits

Hugh Giddens committed 6795bae

Fix remaining issues with issue display.

Comments (0)

Files changed (1)

 (def-jira-issue-field labels)
 (def-jira-issue-field description)
 (def-jira-issue-field type issuetype)
+(def-jira-issue-field resolution)
+(def-jira-issue-field reporter)
 
 (defun jira-issue-watch-count (issue)
   (let* ((fields (cdr (assoc 'fields issue)))
               instance
               (jira-issue-endpoint issue-key)
               (lambda (issue issue-key target-buffer)
-                (let* ((fields (cdr (assoc 'fields issue)))
-                       (project (cdr (assoc 'project fields)))
-                       (issue-type (jira-issue-type issue))
-                       (status (jira-issue-status issue))
-                       (resolution (cdr (assoc 'resolution fields)))
-                       (priority (jira-issue-priority issue))
-                       (assignee (jira-issue-assignee issue))
-                       (reporter (cdr (assoc 'reporter fields)))
-                       (watches (cdr (assoc 'watches fields)))
-                       (comments (jira-issue-comments issue))
-                       (components (mapcar 'jira-item-name (jira-issue-components issue)))
-                       (label (jira-issue-labels issue))
-                       (affect-versions (mapcar 'jira-item-name (jira-issue-versions issue)))
-                       (fix-versions (mapcar 'jira-item-name (jira-issue-fix-versions issue)))
-                       icon-requests)
+                (let ((issue-type (jira-issue-type issue))
+                      (status (jira-issue-status issue))
+                      (priority (jira-issue-priority issue))
+                      (assignee (jira-issue-assignee issue))
+                      (reporter (jira-issue-reporter issue))
+                      (comments (jira-issue-comments issue))
+                      (components (mapcar 'jira-item-name (jira-issue-components issue)))
+                      (label (jira-issue-labels issue))
+                      (affect-versions (mapcar 'jira-item-name (jira-issue-versions issue)))
+                      (fix-versions (mapcar 'jira-item-name (jira-issue-fix-versions issue)))
+                      icon-requests)
                   (with-jira-buffer target-buffer
                     (insert (propertize (format "%s: %s\n"
                                                 (cdr (assoc 'key issue))
                                         'face 'jira-title-face)
                             "\n")
                     (let* ((fields (list (list "Type"
-                                               (cdr (assoc 'name issue-type))
+                                               (jira-item-name issue-type)
                                                (cdr (assoc 'iconUrl issue-type)))
-                                         (list "Status" (cdr (assoc 'name status)) (cdr (assoc 'iconUrl status)))
+                                         (list "Status" (jira-item-name status) (cdr (assoc 'iconUrl status)))
                                          (list "Resolution"
-                                               (cdr (assoc 'name resolution)) ;; XXX icon not in json?
+                                               (jira-item-name (jira-issue-resolution issue)) ;; XXX icon not in json?
                                                )
                                          (list "Priority"
-                                               (cdr (assoc 'name priority))
+                                               (jira-item-name priority)
                                                (cdr (assoc 'iconUrl priority)))
                                          (list "Assignee"
                                                (cdr (assoc 'displayName assignee))