;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require soap-client request json url-parse url-util] 2) #@32 Current version of jiralib.el. (defconst jiralib-version "3.0.0" (#$ . 223)) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\304\301%\210\310\311\312\313\304\301\314\315\316\317& \210\310\320\321\322\304\301%\210\310\323\324\325\304\301\314\326\316\317& \210\327\330\331\332\304\306%\210\327\333\334\335\304\306%\210\327\336\337\340\304\306%\210\327\341\342\343\304\306%\210\327\344\345\346\304\306%\210\327\347\350\351\304\306%\210\327\352\353\354\304\306%\210\327\355\356\357\304\306%\207" [custom-declare-group jiralib nil "Jiralib customization group." :group applications jiralib-faces "Faces for displaying Jiralib information." custom-declare-variable jiralib-use-restapi t "Use restapi instead of soap." :type boolean :initialize custom-initialize-set jiralib-coding-system 'utf-8 "Use custom coding system for Jiralib." jiralib-host "" "User customizable host name of the Jiralib server.\n\nThis will be used with USERNAME to compute password from\n.authinfo file. Will be calculated from jiralib-url if not set." string custom-declare-face jiralib-issue-info-face ((t (:foreground "black" :background "yellow4"))) "Base face for issue information." jiralib-issue-info-header-face ((t (:bold t :inherit 'jiralib-issue-info-face))) "Base face for issue headers." jiralib-issue-summary-face ((t (:bold t))) "Base face for issue summary." jiralib-comment-face ((t (:background "gray23"))) "Base face for comments." jiralib-comment-header-face ((t (:bold t))) "Base face for comment headers." jiralib-link-issue-face ((t (:underline t))) "Face for linked issues." jiralib-link-project-face ((t (:underline t))) "Face for linked projects" jiralib-link-filter-face ((t (:underline t))) "Face for linked filters"] 10) (defvar jiralib-mode-hook nil) (defvar jiralib-mode-map nil) (defvar jiralib-issue-regexp "\\<\\(?:[A-Za-z0-9]+\\)-[0-9]+\\>") (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\316\306\307&\207" [custom-declare-variable jiralib-wsdl-descriptor-url "" "The location for the WSDL descriptor for the JIRA service.\nThis is specific to your local JIRA installation. The URL is\ntypically:\n\n http://YOUR_INSTALLATION/rpc/soap/jirasoapservice-v2?wsdl\n\nThe default value works if JIRA is located at a hostname named\n'jira'." :type string :group jiralib jiralib-url "http://localhost:8081/" "The address of the jira host." jiralib-agile-page-size 50 "Page size for agile API retrieve. Limited by server property jira.search.views.default.max" integer] 8) #@37 JIRA token used for authentication. (defvar jiralib-token nil (#$ . 2774)) #@79 The name of the user logged into JIRA. This is maintained by `jiralib-login'. (defvar jiralib-user-login-name nil (#$ . 2855)) (defvar jiralib-wsdl nil) #@198 A list of triplets: ('Global-Enable 'Descriptive-Label 'Function-Definition) that apply worklog predicate filters during import. Example: (list '('t "descriptive-predicate-label" (lambda (x) x))) (custom-declare-variable 'jiralib-worklog-import--filters-alist '(list '(nil "WorklogUpdatedByCurrentUser" (lambda (wl) (let-alist wl (when (and wl (string-equal (downcase (or jiralib-user-login-name user-login-name)) (downcase \.updateAuthor\.name))) wl)))) '(nil "WorklogAuthoredByCurrentUser" (lambda (wl) (let-alist wl (when (and wl (string-equal (downcase (or jiralib-user-login-name user-login-name)) (downcase \.author\.name))) wl))))) '(#$ . 3015) :type '(repeat (list boolean string function)) :group 'org-jira) #@32 Load the JIRA WSDL descriptor. (defalias 'jiralib-load-wsdl #[nil "\303\304\230\203 \305P\202!\211\207" [jiralib-wsdl-descriptor-url jiralib-url jiralib-wsdl soap-load-wsdl-from-url "" "/rpc/soap/jirasoapservice-v2?wsdl"] 3 (#$ . 3739)]) #@127 Login into JIRA as user USERNAME with PASSWORD. After a successful login, store the authentication token in `jiralib-token'. (defalias 'jiralib-login #[(username password) "\203\306\307\310\311 \312\nQ\313\"\"B\202$\f\204\314 \210\315\f\316\317 \n%@ \211\207" [jiralib-use-restapi username password jiralib-token jiralib-wsdl jiralib-user-login-name "Authorization" format "Basic %s" base64-encode-string ":" t jiralib-load-wsdl soap-invoke "jirasoapservice-v2" "login"] 7 (#$ . 3991) (byte-code "\306V\203\307\310!\311\312!\211 *D\207\313\314\315\316 \317\230\2038\320\f!\321 !$>\2041\322\323\324 D\"\210 \325H)\2029 \326\327\320\f!\321!$>\204N\322\323\324D\"\210\211\330H\206\200\321!$>\204d\322\323\324D\"\210\211\315H\205\200\331\321!$>\204{\322\323\324D\"\210\315H\332\"\262!\333\334\335\336&\n@\337\211%\211&\205\270\340&\341\"\340&\342\"'\343'!\203\257' \202\261')%\n%D+\207" [emacs-major-version password user jiralib-host jiralib-url cl-x 24 read-string "Username for Jira server login? " read-passwd "Password for Jira server login? " auth-source-search :max 1 :host "" url-generic-parse-url type-of signal wrong-type-argument url 4 :port number-to-string 5 url-scheme-get-property default-port :require (:user :secret) :create t nil plist-get :user :secret functionp cl-struct-url-tags secret found sec] 14)]) (defvar jiralib-complete-callback nil) #@1090 Invoke the Jira METHOD, then CALLBACK with supplied PARAMS. This function should be used for all JIRA interface calls, as the method ensures the user is logged in and invokes `soap-invoke' with the correct service name and authentication token. All JIRA interface methods take an authentication token as the first argument. The authentication token is supplied by this function, so PARAMS should omit this parameter. For example, the "getIssue" method takes two parameters: auth and key, however, when invoking it through `jiralib-call', the call should be: (jiralib-call "getIssue" KEY) CALLBACK should be the post processing function to run with the completed data from the request result, which can be accessed with: (cl-getf data :data) as such, the CALLBACK should follow this type of form: (cl-function (lambda (&rest data &allow-other-keys) (print (cl-getf data :data)))) If CALLBACK is set to nil then the request will occur with sync. This produces a noticeable slowdown and is not recommended by request.el, so if at all possible, it should be avoided. (defalias 'jiralib-call #[(method callback &rest params) "\205  \204\"\306\307\310\311\312\313\314#\315\"\"\211\203!\316\317\f!\320Q) \204/\321\322@A#@\207\2047\323\324!\210\325@!\211B\326\267\202a\311\327!\202b\311\330!\202b\311\330!\202b\311\331\332A@\"!C\333\334C\236A\335\")\202b\311\336\313\337A@BC#\202b\311\331\340A@\"!\202b\311\331\341A@\"!\202b\311\331\341A@\"\342\343\344\345AA@!%\202b\311\331\346A@AA@#\342\347\344\345AAA@!%\202b\311\331\341A@\"\342\343\344\345AA@!%\202b\311\331\350A@\"\342\343\344\345AA@!%\202b\311\351\342\343\344\345A@!%C\311\352C\236A\342\353#)\202b\311\351\342\343\344\345A@!%C\311\352C\236A\342\353#)\202b\311\331\354A@AA@#\344\345\355AAA@BC!\342\347%\202b\311\331\356A@\"!\202b\321\357\360\361A$\202b\362\311\331\354A@AA@#!\363\"\202b\362\311\331\350A@\"!\363\"\202b\362\311\331\364A@\"!\363\"\202b\311\331\365A@\"!\202b\311\331\366A@\"!\202b\321\357\331\367A@\"\370AA$\202b\310\370\311\371\342\343\344\345\372A@B\373AA@BD!%\236A\315\"\202b\311\374!\202b\311\375!\202b\310\311\312\313\376#\315\"\202b\310\311\377!\315\"\202b\306\201F\311\331\201GA@\"!A@A\"\202b\362A@AA@DE\201H\201I\311\331\201GA@\"\313\201J#A@A\"*@\201K\"\202b\311\331\201GA@\"\342\343\344\345AA@@AAA@@D!%\202b\311\331\201LA@\"\342\353#\202b\311\331\366A@\"\342\347\344\345\201KAA@BC!%\202b\315)\207" [jiralib-token callback jiralib-complete-callback jiralib-issue-regexp projects jiralib-use-restapi mapcar #[(e) "\301\236A\227\207" [e key] 2] append jiralib--rest-call-it "/rest/api/2/project" :params ((expand . "description,lead,url,projectKeys")) nil "\\<" regexp-opt "-[0-9]+\\>" apply jiralib--call-it call-interactively jiralib-login intern #s(hash-table size 33 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (quote 67 getStatuses 67 getIssueTypes 73 getSubTaskIssueTypes 79 getIssueTypesByProject 85 getUser 107 getVersions 120 getWorklogs 131 addWorklog 142 updateWorklog 162 addWorklogAndAutoAdjustRemainingEstimate 187 addComment 207 createIssue 227 createIssueWithParent 253 editComment 279 getBoard 307 getBoards 318 getComment 328 getComments 346 getAttachmentsFromIssue 360 getComponents 374 getIssue 385 getIssuesFromBoard 396 getIssuesFromJqlSearch 412 getPriorities 441 getProjects 447 getProjectsNoSchemes 453 getResolutions 464 getAvailableActions 473 getFieldsForAction 494 progressWorkflowAction 539 getUsers 569 updateIssue 584)) "/rest/api/2/status" "/rest/api/2/issuetype" format "/rest/api/2/project/%s" cl-coerce issueTypes list "/rest/api/2/user" accountId "/rest/api/2/project/%s/versions" "/rest/api/2/issue/%s/worklog" :type "POST" :data json-encode "/rest/api/2/issue/%s/worklog/%s" "PUT" "/rest/api/2/issue/%s/comment" "/rest/api/2/issue" self "GET" "/rest/api/2/issue/%s/comment/%s" body "/rest/agile/1.0/board/%s" jiralib--agile-call-it "/rest/agile/1.0/board" values org-jira-find-value comments "/rest/api/2/issue/%s?fields=attachment" "/rest/api/2/project/%s/components" "/rest/api/2/issue/%s" "rest/agile/1.0/board/%d/issue" issues "/rest/api/2/search" jql maxResults "/rest/api/2/priority" "rest/api/2/project" ((expand . "description,lead,url,projectKeys")) "/rest/api/2/resolution" method params #1=#:temp response action issue #[(trans) "\301\236\302\236D\207" [trans name id] 3] "/rest/api/2/issue/%s/transitions" seq-filter #[(trans) "\302 \303\"\230\206\302 \304\"\230\207" [action trans org-jira-find-value id name] 4] ((expand . "transitions.fields")) fields "/rest/api/2/user/assignable/search?project=%s&maxResults=10000"] 12 (#$ . 5410)]) #@82 Deprecated SOAP call endpoint. Will be removed soon. Pass ARGS to jiralib-call. (defalias 'jiralib--soap-call-it #[(&rest args) "\303\211\304\305\n\"*\207" [jiralib-use-restapi jiralib-token args nil apply jiralib-call] 3 (#$ . 10131)]) #@29 Read with json, force utf-8 (defalias 'jiralib--json-read #[nil "\301`d#\210\302 \207" [jiralib-coding-system decode-coding-region json-read] 4 (#$ . 10377)]) #@169 Invoke the corresponding jira rest method API. Invoking COMPLETE-CALLBACK when the JIRALIB-COMPLETE-CALLBACK is non-nil, request finishes, and passing ARGS to REQUEST. (defalias 'jiralib--rest-call-it #[(api &rest args) "\306\307\"\310\311\312\313\314 \"\203 \202\315\316\317\n#\315\320\321 #P\322 ?\323\f\324B\325\326\327 & \211\330H)\331\"\207" [args api jiralib-url jiralib-complete-callback jiralib-token cl-x mapcar #[(arg) ";\203\n\302 \"\207\207" [arg jiralib-coding-system encode-coding-string] 3] append apply request string-match "^http[s]*://" replace-regexp-in-string "/*$" "/" "^/*" "" :sync :headers (("Content-Type" . "application/json")) :parser jiralib--json-read :complete 3 nil] 14 (#$ . 10544)]) #@132 Invoke the JIRA METHOD with supplied PARAMS. Internal use, returns a list of responses, of which only the first is normally used. (defalias 'jiralib--call-it #[(method &rest params) "9\203 \305! \204\306\307!\210\3101 \311\312\n\313 &0\207\314\306\307!\210\311\312\n\313 &)\207" [method jiralib-token jiralib-wsdl params data symbol-name call-interactively jiralib-login (soap-error) apply soap-invoke "jirasoapservice-v2" nil] 7 (#$ . 11279)]) #@71 Map all assoc elements in DATA to the value of FIELD in that element. (defalias 'jiralib-make-list #[(data field) "\305\211 :\203 @\306\f\n\"A B A\211\202 \237+\207" [data #1=#:--cl-var-- element #2=#:--cl-var-- field nil assoc] 4 (#$ . 11746)]) #@247 Create an association list from a SOAP structure array. DATA is a list of association lists (a SOAP array-of type) KEY-FIELD is the field to use as the key in the returned alist VALUE-FIELD is the field to use as the value in the returned alist (defalias 'jiralib-make-assoc-list #[(data key-field value-field) "\306\211 :\203# @\307\f\n\"A\307 \n\"AB B A\211\202 \237+\207" [data #1=#:--cl-var-- element #2=#:--cl-var-- key-field value-field nil assoc] 5 (#$ . 12010)]) #@287 Transform the (KEY . VALUE) list FIELDS into a RemoteFieldValue structure. Each (KEY . VALUE) pair is transformed into ((id . KEY) (values . (VALUE))) This method exists because Several JIRA methods require a RemoteFieldValue list, but it is easier to work with ALISTS in emacs-lisp (defalias 'jiralib-make-remote-field-values #[(fields) "\306 \306\211\2038 @\211@\nA\2119\203\307 !\310\f!\204&\311\f!\312 B\313\fBDB* A\211\204\n*\314\311\237\")\207" [remote-field-values fields field --dolist-tail-- value name nil symbol-name vectorp vector id values apply] 4 (#$ . 12499)]) #@37 Return jira rest api for issue KEY. (defalias 'jiralib--rest-api-for-issue-key #[(key) "\301P\207" [key "rest/api/2/issue/"] 2 (#$ . 13102)]) #@76 Update the issue with id KEY with the values in FIELDS, invoking CALLBACK. (defalias 'jiralib-update-issue #[(key fields &optional callback) "\304\305 \n\203\f \202\306 !$\207" [callback key jiralib-use-restapi fields jiralib-call "updateIssue" jiralib-make-remote-field-values] 6 (#$ . 13251)]) (defvar jiralib-status-codes-cache nil) #@194 Return an assoc list mapping a status code to its name. NOTE: Status codes are stored as strings, not numbers. This function will only ask JIRA for the list of codes once, then will cache it. (defalias 'jiralib-get-statuses #[nil "\204 \301\302\303\304\"\305\306#\207" [jiralib-status-codes-cache jiralib-make-assoc-list jiralib-call "getStatuses" nil id name] 4 (#$ . 13598)]) (defvar jiralib-issue-types-cache nil) #@565 Return an assoc list mapping an issue type code to its name. NOTE: Issue type codes are stored as strings, not numbers. This function will only ask JIRA for the list of codes once, than will cache it. The issue types returned via getIssueTypes are all the ones available to the user, but not necessarily available to the given project. This endpoint is essentially a master reference for when issue types need a name lookup when given an id. For applying issue types to a given project that is being created, see the #'jiralib-get-issue-types-by-project call. (defalias 'jiralib-get-issue-types #[nil "\204 \301\302\303\304\"\305\306#\207" [jiralib-issue-types-cache jiralib-make-assoc-list jiralib-call "getIssueTypes" nil id name] 4 (#$ . 14027)]) #@36 An alist of available issue types. (defvar jiralib-issue-types-by-project-cache nil (#$ . 14791)) #@99 Return the available issue types for PROJECT. PROJECT should be the key, such as `EX' or `DEMO'. (defalias 'jiralib-get-issue-types-by-project #[(project) "\302 \"\204\303\304\305\306#\307\310#B B\302 \"A\207" [project jiralib-issue-types-by-project-cache assoc jiralib-make-assoc-list jiralib-call "getIssueTypesByProject" nil id name] 6 (#$ . 14895)]) (defvar jiralib-priority-codes-cache nil) #@198 Return an assoc list mapping a priority code to its name. NOTE: Priority codes are stored as strings, not numbers. This function will only ask JIRA for the list of codes once, than will cache it. (defalias 'jiralib-get-priorities #[nil "\204 \301\302\303\304\"\305\306#\207" [jiralib-priority-codes-cache jiralib-make-assoc-list jiralib-call "getPriorities" nil id name] 4 (#$ . 15306)]) (defvar jiralib-resolution-code-cache nil) #@202 Return an assoc list mapping a resolution code to its name. NOTE: Resolution codes are stored as strings, not numbers. This function will only ask JIRA for the list of codes once, than will cache it. (defalias 'jiralib-get-resolutions #[nil "\204 \301\302\303\304\"\305\306#\207" [jiralib-resolution-code-cache jiralib-make-assoc-list jiralib-call "getResolutions" nil id name] 4 (#$ . 15749)]) #@229 Return a regexp that will match an issue id. The regexp is constructed from the project keys in the JIRA database. An issue is assumed to be in the format KEY-NUMBER, where KEY is a project key and NUMBER is the issue number. (defalias 'jiralib-get-issue-regexp #[nil "\204\302\303\304\305\306\"\"\211\203\307\310 !\311Q)\207" [jiralib-issue-regexp projects mapcar #[(e) "\301\236A\227\207" [e key] 2] jiralib-call "getProjectsNoSchemes" nil "\\<" regexp-opt "-[0-9]+\\>"] 6 (#$ . 16156)]) #@259 Run a JQL query and return the list of issues that matched. LIMIT is the maximum number of queries to return. Note that JIRA has an internal limit of how many queries to return, as such, it might not be possible to find *ALL* the issues that match a query. (defalias 'jiralib-do-jql-search #[(jql &optional limit callback) "\204 \247\204 \303\304\305 \n$\207" [limit callback jql 100 jiralib-call "getIssuesFromJqlSearch"] 5 (#$ . 16664)]) #@318 Set to t to enable caching for jiralib-get-available-actions. If nil, will disable caching for this endpoint. Possible side-effects: - If the server has the project workflow updated, the cache saved here will be incorrect. - If the issue is not up to date with the remote, the wrong cache key may be queried. (custom-declare-variable 'jiralib-available-actions-cache-p t '(#$ . 17118) :type 'boolean :group 'jiralib) #@32 An alist of available actions. (defvar jiralib-available-actions-cache nil (#$ . 17549)) #@136 Return the available workflow actions for ISSUE-KEY. This uses STATUS as the cache key. This runs the getAvailableActions SOAP method. (defalias 'jiralib-get-available-actions #[(issue-key &optional status) "\203& \203&\304 \n\"\204 \305\306\307\310\311\312 #\"\313\314#B\nB\304 \n\"A\207\305\306\315\310\311\312 #\"\313\314#\207" [jiralib-available-actions-cache-p status jiralib-available-actions-cache issue-key assoc jiralib-make-assoc-list mapcar #[(x) "@AA\303\304\n!B *B\207" [x id namestring name org-jira-decode] 3] jiralib-call "getAvailableActions" nil id name #[(x) "@AA\303\304\n!B *B\207" [x id namestring name org-jira-decode] 3]] 8 (#$ . 17645)]) #@211 Set to t to enable caching for jiralib-get-fields-for-action. If nil, will disable caching for this endpoint. Possible side-effects: - If many tasks have different workflows, you may want to disable this. (custom-declare-variable 'jiralib-fields-for-action-cache-p t '(#$ . 18329) :type 'boolean :group 'jiralib) #@31 An alist of available fields. (defvar jiralib-fields-for-action-cache nil (#$ . 18653)) #@62 Return the required fields to change ISSUE-KEY to ACTION-ID. (defalias 'jiralib-get-fields-for-action-with-cache #[(issue-key action-id) "\203 \203 \304 \n\"\204 \305\306\307 $B\nB\304 \n\"A\207\305\306\307 $\207" [jiralib-fields-for-action-cache-p action-id jiralib-fields-for-action-cache issue-key assoc jiralib-call "getFieldsForAction" nil] 6 (#$ . 18747)]) #@62 Return the required fields to change ISSUE-KEY to ACTION-ID. (defalias 'jiralib-get-fields-for-action #[(issue-key action-id) "\203\304 \n\"\305\306 \")\207\307\304 \n\"\310\311#\207" [jiralib-use-restapi issue-key action-id fields jiralib-get-fields-for-action-with-cache mapcar #[(field) "\301@!\302\303\304\305\"\304\306\"\307=\203\310\202\311#B\207" [field symbol-name format "%s (required: %s)" org-jira-find-value name required :json-false "nil" "t"] 7] jiralib-make-assoc-list id name] 4 (#$ . 19125)]) #@131 Progress issue with ISSUE-KEY to action ACTION-ID, and provide the needed PARAMS. When CALLBACK is present, this will run async. (defalias 'jiralib-progress-workflow-action #[(issue-key action-id params &optional callback) "\203\305\306 \n\307\310 BDC\311\fBC%\207\305\306 \n \312\f!%\207" [jiralib-use-restapi callback issue-key action-id params jiralib-call "progressWorkflowAction" transition id fields jiralib-make-remote-field-values] 7 (#$ . 19653)]) #@256 Convert a mixed DATETIME format into the Jira required datetime format. This will produce a datetime string such as: 2010-02-05T14:30:00.000+0000 for being consumed in the Jira API. If DATETIME is not passed in, it will default to the current time. (defalias 'jiralib-format-datetime #[(&optional datetime) "\303\304\305 \" \306 G\"P\307 !\310\311\312\n8\313\n8\314\n8\315\n8\nA@\n@&+\207" [defaults datetime parts format-time-string "%Y-%m-%d %H:%M:%S" current-time subseq parse-time-string format "%04d-%02d-%02dT%02d:%02d:%02d.000+0000" 5 4 3 2] 8 (#$ . 20121)]) (defvar jiralib-worklog-coming-soon-message "WORKLOG FEATURES ARE NOT IMPLEMENTED YET, COMING SOON!") #@402 Log time spent on ISSUE-KEY to its worklog. The time worked begins at START-DATE and has a TIME-SPENT duration. JIRA will automatically update the remaining estimate by subtracting TIME-SPENT from it. START-DATE should be in the format 2010-02-05T14:30:00Z TIME-SPENT can be in one of the following formats: 10m, 120m hours; 10h, 120h days; 10d, 120d weeks. COMMENT will be added to this worklog. (defalias 'jiralib-add-worklog-and-autoadjust-remaining-estimate #[(issue-key start-date time-spent comment) "\305!\306\307\310\n\311 B\312 B\304\fBE$)\207" [start-date formatted-start-date issue-key time-spent comment jiralib-format-datetime jiralib-call "addWorklogAndAutoAdjustRemainingEstimate" nil started timeSpent] 8 (#$ . 20807)]) #@26 Return the key of ISSUE. (defalias 'jiralib-issue-key #[(issue) "\301\236A\207" [issue key] 2 (#$ . 21555)]) #@28 Return the owner of ISSUE. (defalias 'jiralib-issue-owner #[(issue) "\301\236A\207" [issue assignee] 2 (#$ . 21671)]) #@67 Return the status of ISSUE as a status string (not as a number!). (defalias 'jiralib-issue-status #[(issue) "\302\236A\303 \304 \"A)\207" [issue status-code status assoc jiralib-get-statuses] 3 (#$ . 21796)]) #@82 Return the value of CUSTOM-FIELD for ISSUE. Return nil if the field is not found (defalias 'jiralib-custom-field-value #[(custom-field issue) "\3042.\305\236A\306\211\205,\n@\307 \236A \232\203$\310\304\311 \236A@\"\210\nA\211\204\306*0\207" [issue field --dolist-tail-- custom-field found customFieldValues nil customfieldId throw values] 5 (#$ . 22013)]) #@42 This holds the currently selected issue. (defvar jiralib-current-issue nil (#$ . 22386)) #@50 This holds a list of projects and their details. (defvar jiralib-projects-list nil (#$ . 22481)) #@36 This holds a list of issues types. (defvar jiralib-types nil (#$ . 22584)) #@34 This holds a list of priorities. (defvar jiralib-priorities nil (#$ . 22665)) #@38 This holds a list of user fullnames. (defvar jiralib-user-fullnames nil (#$ . 22749)) #@50 Return the name of the JIRA project with id KEY. (defalias 'jiralib-get-project-name #[(key) "\306\211\306\211\203$\f@\305 \236A \232\203\301 \236A\fA\211\204\f* *\207" [jiralib-projects-list name projects project --dolist-tail-- key nil] 3 (#$ . 22841)]) #@44 Return the name of the issue type with ID. (defalias 'jiralib-get-type-name #[(id) "\306\211\306\211\203$\f@\305 \236A \232\203\301 \236A\fA\211\204\f* *\207" [jiralib-types name types type --dolist-tail-- id nil] 3 (#$ . 23115)]) #@63 Return the full name (displaName) of the user with accountId. (defalias 'jiralib-get-user-fullname #[(account-id) "\305\306!\306\307\306:\203/@\310\f \"\203$\311 \236A\306\211\202%\307\203/A\211\202 ,\207" [#1=#:--cl-var-- user #2=#:--cl-var-- #3=#:--cl-var-- account-id jiralib-get-users nil t rassoc displayName] 4 (#$ . 23364)]) #@88 Return the account-id (accountId) of the user with FULL-NAME (displayName) in PROJECT. (defalias 'jiralib-get-user-account-id #[(project full-name) "\306!\307\310\307 :\203/ @\311 \n\"\203$\312\n\236A\307\211\202%\310\203/ A\211\202 \f,\207" [project #1=#:--cl-var-- user #2=#:--cl-var-- #3=#:--cl-var-- full-name jiralib-get-users nil t rassoc accountId] 4 (#$ . 23719)]) #@38 Return a filter given its FILTER-ID. (defalias 'jiralib-get-filter #[(filter-id) "\301\302\303\304 \")\207" [#1=#:--cl-id-match-- #[(filter) "\302 \236A\232\207" [filter-id filter id] 3] cl-find-if id-match jiralib-get-saved-filters] 3 (#$ . 24112)]) #@57 Return an association list mapping filter names to IDs. (defalias 'jiralib-get-filter-alist #[nil "\300\301\302 \"\207" [mapcar #[(filter) "\301\236A\302\236AB\207" [filter name id] 3] jiralib-get-saved-filters] 3 (#$ . 24371)]) #@65 Add to issue with ISSUE-KEY the given COMMENT, invoke CALLBACK. (defalias 'jiralib-add-comment #[(issue-key comment &optional callback) "\303\304 \305\nBC$\207" [callback issue-key comment jiralib-call "addComment" body] 6 (#$ . 24608)]) #@81 Edit ISSUE-ID's comment COMMENT-ID to reflect the new COMMENT, invoke CALLBACK. (defalias 'jiralib-edit-comment #[(issue-id comment-id comment &optional callback) "\204\305\306 \307\nB\310 BD#\207\305\306 \f\n %\207" [jiralib-use-restapi callback comment-id comment issue-id jiralib-call "editComment" id body] 6 (#$ . 24853)]) #@62 Create a new ISSUE in JIRALIB. ISSUE is a Hashtable object. (defalias 'jiralib-create-issue #[(issue) "\301\302\303#\207" [issue jiralib-call "createIssue" nil] 4 (#$ . 25190)]) #@80 Create SUBTASK for issue with PARENT-ISSUE-ID. SUBTASK is a Hashtable object. (defalias 'jiralib-create-subtask #[(subtask) "\301\302\303#\207" [subtask jiralib-call "createIssueWithParent" nil] 4 (#$ . 25376)]) (defvar jiralib-subtask-types-cache nil) #@203 Return an assoc list mapping an issue type code to its name. NOTE: Issue type codes are stored as strings, not numbers. This function will only ask JIRA for the list of codes once, than will cache it. (defalias 'jiralib-get-subtask-types #[nil "\204 \301\302\303\304\"\305\306#\207" [jiralib-subtask-types-cache jiralib-make-assoc-list jiralib-call "getSubTaskIssueTypes" nil id name] 4 (#$ . 25638)]) #@73 Return all comments associated with issue ISSUE-KEY, invoking CALLBACK. (defalias 'jiralib-get-comment #[(issue-key comment-id &optional callback) "\303\304 \n$\207" [callback issue-key comment-id jiralib-call "getComment"] 5 (#$ . 26051)]) #@73 Return all comments associated with issue ISSUE-KEY, invoking CALLBACK. (defalias 'jiralib-get-comments #[(issue-key &optional callback) "\302\303 #\207" [callback issue-key jiralib-call "getComments"] 4 (#$ . 26299)]) #@76 Return all attachments associated with issue ISSUE-KEY, invoking CALLBACK. (defalias 'jiralib-get-attachments #[(issue-key &optional callback) "\302\303 #\207" [callback issue-key jiralib-call "getAttachmentsFromIssue"] 4 (#$ . 26525)]) #@73 Return all worklogs associated with issue ISSUE-KEY, invoking CALLBACK. (defalias 'jiralib-get-worklogs #[(issue-key &optional callback) "\302\303 #\207" [callback issue-key jiralib-call "getWorklogs"] 4 (#$ . 26769)]) #@182 Add the worklog linked to ISSUE-ID. Requires STARTED (a jira datetime), TIME-SPENT-SECONDS (integer) and a COMMENT. CALLBACK will be invoked if passed in upon endpoint completion. (defalias 'jiralib-add-worklog #[(issue-id started time-spent-seconds comment &optional callback) "\306]\301 B\307B\302\nBE\310\311\f $)\207" [time-spent-seconds started comment worklog callback issue-id 60 timeSpentSeconds jiralib-call "addWorklog"] 5 (#$ . 26996)]) #@200 Update the worklog linked to ISSUE-ID and WORKLOG-ID. Requires STARTED (a jira datetime), TIME-SPENT-SECONDS (integer) and a COMMENT. CALLBACK will be invoked if passed in upon endpoint completion. (defalias 'jiralib-update-worklog #[(issue-id worklog-id started time-spent-seconds comment &optional callback) "\306]\301 B\307B\302\nBE\310\311\f \n %)\207" [time-spent-seconds started comment worklog callback issue-id 60 timeSpentSeconds jiralib-call "updateWorklog" worklog-id] 6 (#$ . 27457)]) #@33 An alist of project components. (defvar jiralib-components-cache nil (#$ . 27966)) #@61 Return all components available in the project PROJECT-KEY. (defalias 'jiralib-get-components #[(project-key) "\302 \"\204\303\304\305\306#\307\310#B B\302 \"A\207" [project-key jiralib-components-cache assoc jiralib-make-assoc-list jiralib-call "getComponents" nil id name] 6 (#$ . 28055)]) #@59 Get the issue with key ISSUE-KEY, running CALLBACK after. (defalias 'jiralib-get-issue #[(issue-key &optional callback) "\302\303 #\207" [callback issue-key jiralib-call "getIssue"] 4 (#$ . 28360)]) #@54 Get the issues from applying saved filter FILTER-ID. (defalias 'jiralib-get-issues-from-filter #[(filter-id) "\301\302!\210\303\304\305#\207" [filter-id message "jiralib-get-issues-from-filter is NOT IMPLEMENTED!! Do not use!" jiralib-call "getIssuesFromFilter" nil] 4 (#$ . 28566)]) #@50 Find issues using free text search SEARCH-TERMS. (defalias 'jiralib-get-issues-from-text-search #[(search-terms) "\301\302\303#\207" [search-terms jiralib-call "getIssuesFromTextSearch" nil] 4 (#$ . 28858)]) #@114 Find issues in projects PROJECT-KEYS, using free text search SEARCH-TERMS. Return no more than MAX-NUM-RESULTS. (defalias 'jiralib-get-issues-from-text-search-with-project #[(project-keys search-terms max-num-results) "\303\304\305\306\307\" \n%\207" [project-keys search-terms max-num-results jiralib-call "getIssuesFromTextSearchWithProject" nil apply vector] 6 (#$ . 29074)]) #@50 Return a list of projects available to the user. (defalias 'jiralib-get-projects #[nil "\203\207 \203\302\303\304\"\202\302\305\304\"\211\207" [jiralib-projects-list jiralib-use-restapi jiralib-call "getProjects" nil "getProjectsNoSchemes"] 3 (#$ . 29461)]) #@67 Get all saved filters available for the currently logged in user. (defalias 'jiralib-get-saved-filters #[nil "\300\301\302\303\"\304\305#\207" [jiralib-make-assoc-list jiralib-call "getSavedFilters" nil id name] 4 (#$ . 29734)]) #@90 Return the Server information such as baseUrl, version, edition, buildDate, buildNumber. (defalias 'jiralib-get-server-info #[nil "\300\301\302\"\207" [jiralib-call "getServerInfo" nil] 3 (#$ . 29969)]) #@55 Return all visible subtask issue types in the system. (defalias 'jiralib-get-sub-task-issue-types #[nil "\300\301\302\"\207" [jiralib-call "getSubTaskIssueTypes" nil] 3 (#$ . 30178)]) #@52 Return a user's information given their full name. (defalias 'jiralib-get-user #[(account-id) "G\301=\203 \302\207\303\304\302#\207" [account-id 0 nil jiralib-call "getUser"] 4 (#$ . 30368)]) #@23 Cached list of users. (defvar jiralib-users-cache nil (#$ . 30569)) #@60 Return assignable users information given the PROJECT-KEY. (defalias 'jiralib-get-users #[(project-key) "\204.\306\307\310 #\n\310\211 :\203- @\211\211A\242\311\312\f!C\" A\211\202+\207" [jiralib-users-cache project-key org-jira-users #1=#:--cl-var-- id name jiralib-call "getUsers" nil append jiralib-get-user] 5 (#$ . 30643)]) #@55 Return all versions available in project PROJECT-KEY. (defalias 'jiralib-get-versions #[(project-key) "\301\302\303#\207" [project-key jiralib-call "getVersions" nil] 4 (#$ . 30994)]) #@38 Remove carriage returns from STRING. (defalias 'jiralib-strip-cr #[(string) "\205 \301\302\303#\207" [string replace-regexp-in-string " " ""] 4 (#$ . 31185)]) #@914 Remove non-matching org-jira issue worklogs. Variables: WORKLOG-OBJ is the passed in object PREDICATE-FN-LST is the list of lambdas used as match predicates. UNWRAP-WORKLOG-RECORDS-FN is the function used to produce the list of worklog records from within the worklog-obj REWRAP-WORKLOG-RECORDS-FN is the function used to reshape the worklog records back into the form they were received in. Auxiliary Notes: Only the WORKLOG-OBJ variable is required. The value of PPREDICATE-FN-LST is filled from the jiralib-worklog-import--filters-alist variable by default. If PREDICATE-FN-LST is empty the unmodified value of WORKLOG-OBJ is returned. If PREDICATE-FN-LST contains multiple predicate functions, each predicate filters operates as a clause in an AND match. In effect, a worklog must match all predicates to be returned. The variable 'jiralib-user-login-name is used by many lambda filters. (defalias 'jiralib-worklog-import--filter-apply #[(worklog-obj &optional predicate-fn-lst unwrap-worklog-records-fn rewrap-worklog-records-fn) "\306\211\211\306\307\305!\203\310 !\203 \202\311\307\304!\203,\310\f!\203,\f\202-\312\307\303!\203A \203A <\203A \202L\313\314\315\306\313\316\"\"\"\307\303!\203\\ <\203\\ \204`\202y \n! \211A\242\211\203v\313 \n\"\202d\f\n!-\207" [worklog-obj predicate-fn worklogs predicate-fn-lst rewrap-worklog-records-fn unwrap-worklog-records-fn nil boundp functionp #[(x) "\301\302\"\207" [x coerce list] 3] #[(x) "\301\302\303\304\"\"\207" [x remove nil coerce vector] 5] mapcar caddr remove #[(x) "@\205\207" [x] 1] jiralib-worklog-import--filters-alist] 7 (#$ . 31354)]) #@31 Return details on given board (defalias 'jiralib-get-board #[(id &optional callback) "\301\302\303#\207" [id jiralib-call "getBoard" nil] 4 (#$ . 33022)]) #@28 Return list of jira boards (defalias 'jiralib-get-boards #[nil "\300\301\302\"\207" [jiralib-call "getBoards" nil] 3 (#$ . 33184)]) #@56 Return list of jira issues in the specified jira board (defalias 'jiralib-get-board-issues #[(board-id &rest params) "\302\303\304\305\306\" %\207" [params board-id apply jiralib-call "getIssuesFromBoard" cl-getf :callback] 6 (#$ . 33322)]) #@58 Return true if need to retrieve next page from agile api (defalias 'jiralib--agile-not-last-entry #[(num-entries total start-at limit) "\304V\205 \203 \305W\204 \nV\205 ?\206 \nV\207" [num-entries limit start-at total 0 1] 2 (#$ . 33571)]) (defalias 'jiralib--agile-limit-page-size #[(page-size start-at limit) "\203 \n\\V\203 Z\207\n\207" [limit start-at page-size] 2]) (defalias 'jiralib--agile-rest-call-it #[(api max-results start-at limit query-params) "\306\307\310\311\312\313 \n #D\314\nDD\f\"!#\315 !)\207" [api max-results start-at limit query-params callurl format "%s?%s" url-build-query-string append maxResults jiralib--agile-limit-page-size startAt jiralib--rest-call-it] 10]) #@670 Invoke Jira agile method api and retrieve the results using paging. If JIRALIB-COMPLETE-CALLBACK is non-nil, then the call will be performed asynchronously and JIRALIB-COMPLETE-CALLBACK will be called when all data are retrieved. If JIRALIB-COMPLETE-CALLBACK is nil, then the call will be performed syncronously and this function will return the retrieved data. API - path to called API that must start with /rest/agile/1.0. VALUES-KEY - key of the actual reply data in the reply assoc list. PARAMS - optional additional parameters. :limit - limit total number of retrieved entries. :query-params - extra query parameters in the format of url-build-query-string.  (defalias 'jiralib--agile-call-it #[(api values-key &rest params) "\203 \304\305 \n $\207\304\306 \n $\207" [jiralib-complete-callback api values-key params apply jiralib--agile-call-async jiralib--agile-call-sync] 5 (#$ . 34290)]) #@383 Syncroniously invoke Jira agile method api retrieve all the results using paging and return results. VALUES-KEY - key of the actual reply data in the reply assoc list. PARAMS - extra parameters (as keyword arguments), the supported parameters are: :limit - limit total number of retrieved entries. :query-params - extra query parameters in the format of url-build-query-string.  (defalias 'jiralib--agile-call-sync #[(api values-key &rest params) "\306\307\310\311 \312\"\311 \313\"\n\306\203\\\314\f %\315\"A\211G\316\236A\317 \317\306\"\"\\\320$,\202 .\207" [jiralib-complete-callback params jiralib-agile-page-size values max-results query-params nil t 0 cl-getf :limit :query-params jiralib--agile-rest-call-it assoc total append jiralib--agile-not-last-entry limit start-at not-last api reply-alist values-key values-array num-entries] 7 (#$ . 35200)]) #@351 Asyncroniously invoke Jira agile method api, retrieve all the results using paging and call JIRALIB-COMPLETE_CALLBACK when all the data are retrieved. VALUES-KEY - key of the actual reply data in the reply assoc list. PARAMS - extra parameters (as keyword arguments), the supported parameters are: limit - limit total number of retrieved entries. (defalias 'jiralib--agile-call-async #[(api values-key &rest params) "\306\307!\306\310!\306\311!\306\312!\306\313!\306\314!\306\315!\306\316!\211\211\317L\210)\211 \320!\321\"L\210) \211\"\320!\322\"L\210)\f\211#$L\210) \211%\323L\210)\n\211&'L\210) \211()L\210)\211*+L\210)\324\325\326\327\330\331D\332D\332 D\332\nD\332 D\332\fD\332 D\332D\332D\333\257 F+\334)\fJJJ J%.\207" [#1=#:--cl-complete-callback-- #2=#:--cl-url-- #3=#:--cl-vk-- #4=#:--cl-values-list-- #5=#:--cl-max-results-- #6=#:--cl-query-params-- make-symbol "--start-at--" "--limit--" "--query-params--" "--max-results--" "--values-list--" "--vk--" "--url--" "--complete-callback--" 0 cl-getf :limit :query-params nil lambda (&rest --cl-rest--) "\n\n(fn &rest DATA &allow-other-keys)" apply function #[(#7=#:G0 #8=#:G1 #9=#:G2 #10=#:G3 #11=#:G4 #12=#:G5 #13=#:G6 #14=#:G7 &rest data) "\3061\214\307\310\"\311\nJ \"A\211G\305 \236A\211\312J\312 \313\"\"L\210)\211J\f\\L\210)\314\315J \203C\316\202D\317 \203N\320 !\202O\317$\210\321\f JJ$\203r\322JJJJJ%\202\211\314\323!\210J\211 \310\nJJBC\"\210\314\324!,0\207!\314\325\326!\"!)\207" [data reply-alist #9# values-array num-entries total 'error cl-getf :data assoc append nil message "jiralib agile retrieve: got %d values%s%s" " of " "" int-to-string jiralib--agile-not-last-entry jiralib--agile-rest-call-it "jiralib agile retrieve: calling callback" "jiralib agile retrieve: all done" format "jiralib agile retrieve: caught error: %s" #10# #15=#:v #14# #16=#:v #13# #8# #11# #12# #7# jiralib-complete-callback err] 7] quote --cl-rest-- jiralib--agile-rest-call-it #17=#:--cl-limit-- #18=#:--cl-start-at-- #19=#:v #20=#:v params #21=#:v #22=#:v jiralib-agile-page-size #23=#:v #24=#:v values-key #25=#:v api #26=#:v jiralib-complete-callback] 15 (#$ . 36123)]) (provide 'jiralib)