]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
ox-jira: fix for timestamp
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 19 Dec 2016 17:17:09 +0000 (18:17 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 19 Dec 2016 17:17:09 +0000 (18:17 +0100)
- kind of dirty but as Jira itself has nothing comparable it's better
  than not-implemented stuff.

Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
elpa/ox-jira-20161026.429/ox-jira.el

index 84523809332229c7c4e5b63955682b21707c3209..c93608c074c7945146863b0d8b7d06c05b0c75f0 100644 (file)
@@ -92,7 +92,7 @@
     (table-cell . ox-jira-table-cell)
     (table-row . ox-jira-table-row)
     (target . (lambda (&rest args) (ox-jira--not-implemented 'target)))
-    (timestamp . (lambda (&rest args) (ox-jira--not-implemented 'timestamp)))
+    (timestamp . ox-jira-timestamp)
     (underline . ox-jira-underline)
     (verbatim . ox-jira-verbatim)
     (verse-block . (lambda (&rest args) (ox-jira--not-implemented 'verse-block))))
@@ -157,6 +157,12 @@ CONTENTS is the text with bold markup. INFO is a plist holding
 contextual information."
   (format "*%s*" contents))
 
+(defun ox-jira-timestamp (timestamp contents info)
+  "Transcode BOLD from Org to JIRA.
+CONTENTS is the text with bold markup. INFO is a plist holding
+contextual information."
+  (format "{color:red}%s{color}" (replace-regexp-in-string "[][]" "*" (org-ascii-plain-text (org-timestamp-translate timestamp) info))))
+
 (defun ox-jira-code (code _contents info)
   "Transcode a CODE object from Org to JIRA.
 CONTENTS is nil.  INFO is a plist used as a communication