emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/rt-liberation 46d4ec1 39/72: Remove (too bad).


From: Stefan Monnier
Subject: [elpa] externals/rt-liberation 46d4ec1 39/72: Remove (too bad).
Date: Wed, 5 Aug 2020 11:57:39 -0400 (EDT)

branch: externals/rt-liberation
commit 46d4ec196a74b9261ff2e0615a37d621ee875812
Author: Yoni Rabkin <yrk@gnu.org>
Commit: Yoni Rabkin <yrk@gnu.org>

    Remove (too bad).
    
    I cannot make this work reliably anymore. It sometimes will delete the
    ticket without marking it as spam.
---
 rt-liberation.el | 40 +++++++++++-----------------------------
 1 file 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]