summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoni Rabkin <yrk@gnu.org>2015-05-13 11:51:57 -0400
committerYoni Rabkin <yrk@gnu.org>2015-05-13 11:51:57 -0400
commit46d4ec196a74b9261ff2e0615a37d621ee875812 (patch)
treeade64e446d22a978661ef1f82f01633c1fcd0cbc
parent1e7f7205df1ceea65faa61d21dad453dd7a730ee (diff)
Remove (too bad).
I cannot make this work reliably anymore. It sometimes will delete the ticket without marking it as spam.
-rw-r--r--rt-liberation.el40
1 files changed, 11 insertions, 29 deletions
diff --git a/rt-liberation.el b/rt-liberation.el
index 849dec2..9856e91 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -1144,9 +1144,6 @@ string then that will be the name of the new buffer."
(define-key map (kbd "RET") 'rt-liber-display-ticket-at-point)
(define-key map (kbd "g") 'revert-buffer)
(define-key map (kbd "G") 'rt-liber-browser-refresh-and-return)
- ;; this feature is broken for now
- ;; (define-key map (kbd "s") 'rt-liber-browser-mark-as-spam)
- ;; (define-key map (kbd "S") 'rt-liber-multi-delete-spam)
(define-key map (kbd "a") 'rt-liber-browser-assign)
(define-key map (kbd "r") 'rt-liber-browser-resolve)
(define-key map (kbd "o") 'rt-liber-browser-open)
@@ -1280,20 +1277,20 @@ string then that will be the name of the new buffer."
"Display command return status from the server to the user."
(message (buffer-string)))
-(defun rt-liber-command-set-cf (id field value)
- "Add custom field FIELD with VALUE to ID.
-If FIELD already exists, update to VALUE."
- (let ((command (rt-liber-command-get-command-string 'edit))
- (args
- (format "ticket/%s set %s=%s" id field value)))
- (rt-liber-parse-answer
- (rt-liber-command-runner command args)
- 'rt-liber-command-runner-parser-f)))
+;; Depreciated in favor of using the REST interface.
+;;
+;; (defun rt-liber-command-set-cf (id field value)
+;; "Add custom field FIELD with VALUE to ID.
+;; If FIELD already exists, update to VALUE."
+;; (let ((command (rt-liber-command-get-command-string 'edit))
+;; (args
+;; (format "ticket/%s set %s=%s" id field value)))
+;; (rt-liber-parse-answer
+;; (rt-liber-command-runner command args)
+;; 'rt-liber-command-runner-parser-f)))
(defun rt-liber-command-set-status (id status)
"Set ticket ID status to be STATUS."
- ;; TODO: Sanity check status
- ;; TODO: defmacro?
(let ((command (rt-liber-command-get-command-string 'edit))
(args
(format "ticket/%s set status=%s" id status)))
@@ -1418,21 +1415,6 @@ If FIELD already exists, update to VALUE."
queue)
(rt-liber-browser-refresh))
-;; Unfortunately, RT have broken this. Hope I can fix it by moving
-;; over the the REST interface.
-(defun rt-liber-browser-mark-as-spam ()
- "Mark the current ticket as spam, and delete it."
- (interactive)
- (error "this feature is currently broken! I'm working on it...")
- ;; (if (y-or-n-p "Delete marked ticket as spam? ")
- ;; (let ((id (rt-liber-browser-ticket-id-at-point)))
- ;; (rt-liber-command-set-cf
- ;; id (rt-liber-command-get-custom-field-string 'cf-is-spam) "yes")
- ;; (rt-liber-command-set-status-deleted id)
- ;; (rt-liber-browser-refresh))
- ;; (message "aborted"))
- )
-
(defun rt-liber-browser-take-ticket-at-point ()
"Assign the ticket under point to `rt-liber-username'."
(interactive)