summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoni Rabkin <yoni@rabkins.net>2020-08-03 16:52:24 -0400
committerYoni Rabkin <yoni@rabkins.net>2020-08-03 16:52:24 -0400
commit05beb9f354ed1f4600b18d88954a485536b3f8f9 (patch)
tree26ca0d1082a412a894a541c9471b9a3682abe215
parentea3e01b5ae529c752aab3fb445fce7aa2a6a9106 (diff)
* rt-liberation.el: remove old cli code
-rw-r--r--rt-liberation.el72
1 files changed, 1 insertions, 71 deletions
diff --git a/rt-liberation.el b/rt-liberation.el
index 2eeea6c..b6345ba 100644
--- a/rt-liberation.el
+++ b/rt-liberation.el
@@ -46,6 +46,7 @@
(require 'rt-liberation-rest)
+
(defgroup rt-liber nil
"*rt-liberation, the Emacs interface to RT"
:prefix "rt-liber-"
@@ -96,9 +97,6 @@
"^Type: \\(EmailRecord\\|CommentEmailRecord\\|Correspond\\)"
"Regular expression for correspondence sections.")
-(defvar rt-liber-rt-version "X.Y.Z"
- "Version of the RT CLI.")
-
(defvar rt-liber-username nil
"Username for assigning ownership on the RT server.")
@@ -368,26 +366,6 @@ AFTER date after predicate."
;;; --------------------------------------------------------
-;;; TicketSQL runner
-;;; --------------------------------------------------------
-
-(defun rt-liber-ticketsql-runner-parser-f ()
- "Parser function for a textual list of tickets."
- (let (idsub-list)
- (while (or
- (and (not (rt-liber-version-< rt-liber-rt-version
- "3.8.2"))
- (re-search-forward "^ *\\([0-9]+\\) *\\(.*\\)$"
- (point-max) t))
- (re-search-forward "^\\([0-9]+\\): \\(.*\\)$"
- (point-max) t))
- (push (list (match-string-no-properties 1)
- (match-string-no-properties 2))
- idsub-list))
- idsub-list))
-
-
-;;; --------------------------------------------------------
;;; Ticket list retriever
;;; --------------------------------------------------------
@@ -433,54 +411,6 @@ AFTER date after predicate."
ticket-list)))
(signal 'rt-liber-no-result-from-query-error nil))))
-(defun rt-liber-run-show-base-query (idsublist)
- "Run \"show\" type query against the server with IDSUBLIST."
- (rt-liber-parse-answer
- (rt-liber-query-runner "show"
- (rt-liber-create-tickets-string idsublist))
- #'rt-liber-ticket-base-retriever-parser-f))
-
-
-;;; --------------------------------------------------------
-;;; Ticket retriever
-;;; --------------------------------------------------------
-
-(defun rt-liber-create-ticket-history-string (ticket-id)
- "Create a query for TICKET-ID to retrieve all history objects."
- (concat "ticket/" ticket-id "/history/id"))
-
-(defun rt-liber-create-ticket-histories-string (ticket-id subid-list)
- "Create query for TICKET-ID to retrieve SUBID-LIST objects."
- (concat "ticket/" ticket-id "/history/id/"
- (reduce
- #'(lambda (a b) (format "%s,%s" a b)) subid-list)))
-
-(defun rt-liber-run-ticket-history-base-query (ticket-id)
- "Run history query against server for TICKET-ID."
- (rt-liber-parse-answer
- (rt-liber-query-runner "show"
- (rt-liber-create-ticket-history-string
- ticket-id))
- (if (rt-liber-version-< rt-liber-rt-version "3.8.2")
- #'(lambda ()
- (let ((ticket-history-sublist nil))
- (goto-char (point-min))
- (while (re-search-forward "^\\([0-9]+\\): " (point-max) t)
- (setq ticket-history-sublist
- (append (list (match-string-no-properties 1))
- ticket-history-sublist)))
- (if ticket-history-sublist
- (rt-liber-parse-answer
- (rt-liber-query-runner
- "show"
- (rt-liber-create-ticket-histories-string
- ticket-id
- ticket-history-sublist))
- #'(lambda () (buffer-substring (point-min)
- (point-max))))
- (error "an unhandled exceptions occurred"))))
- #'(lambda () (buffer-substring (point-min) (point-max))))))
-
;;; --------------------------------------------------------
;;; Ticket utilities