Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'legoscia/set-owner'

  • Loading branch information...
commit 3364cc9e6ec85d1191948e8067b0669a8f63bb1e 2 parents 25f6a16 + 2850989
@jxa authored
Showing with 18 additions and 0 deletions.
  1. +1 −0  README.md
  2. +17 −0 pivotal-tracker.el
View
1  README.md
@@ -44,6 +44,7 @@ or set it manually:
** example: pressing <kbd>2</kbd> followed by pressing <kbd>E</kbd> will assign a **2 pt** estimate for current story
* <kbd>C</kbd> will prompt for a new comment
* <kbd>S</kbd> will prompt for new status
+* <kbd>O</kbd> will prompt for new story owner
* <kbd>T</kbd> will prompt for a new task
* <kbd>F</kbd> will mark the task (not the story) under the cursor as finished
* <kbd>+</kbd> adds a new story
View
17 pivotal-tracker.el
@@ -160,6 +160,22 @@
'pivotal-update-current-story
(format "<story><current_state>%s</current_state></story>" new-state))))
+(defun pivotal-set-owner (new-owner-id)
+ "set owner for the current story."
+ (interactive
+ (let ((member-name-id-alist (pivotal-project->member-name-id-alist *pivotal-current-project*)))
+ (list (cdr (assoc (completing-read "New owner: "
+ member-name-id-alist
+ nil
+ t
+ nil
+ 'pivotal-story-owner-history)
+ member-name-id-alist)))))
+ (pivotal-api (pivotal-url "projects" *pivotal-current-project* "stories" (pivotal-story-id-at-point))
+ "PUT"
+ 'pivotal-update-current-story
+ (format "<story><owned_by_id>%s</owned_by_id></story>" new-owner-id)))
+
(defun pivotal-add-comment (comment)
"prompt user for comment and add it to the current story"
(interactive "sAdd Comment: ")
@@ -294,6 +310,7 @@
(define-key pivotal-mode-map (kbd "E") 'pivotal-estimate-story)
(define-key pivotal-mode-map (kbd "C") 'pivotal-add-comment)
(define-key pivotal-mode-map (kbd "S") 'pivotal-set-status)
+ (define-key pivotal-mode-map (kbd "O") 'pivotal-set-owner)
(define-key pivotal-mode-map (kbd "L") 'pivotal)
(define-key pivotal-mode-map (kbd "T") 'pivotal-add-task)
(define-key pivotal-mode-map (kbd "+") 'pivotal-add-story)
Please sign in to comment.
Something went wrong with that request. Please try again.