         (org-redmine-insert-property issue))))
 
 ;;------------------------------
+;; org-redmine read buffer functions
+;;------------------------------
+(defun org-redmine-cur-org-issue ()
+ (make-org-redmine-issue-struct :subject (nth 4 (org-heading-components)) :project_id (nth 1 (org-get-tags))))
+
+(defun org-redmine-jsonize-issue (issue)
+  (concat "{ \"issue\": {"
+         "\"project_id\": \"" (org-redmine-issue-struct-project_id issue) "\"" ","
+         "\"subject\": \"" (org-redmine-issue-struct-subject issue) "\"" ","
+         "\"assigned_to_id\":" org-redmine-assignee-id
+       "}}")
+)
+;;------------------------------
 ;; org-redmine sources for user function
 ;;------------------------------
 (defun org-redmine-get-issue-all (me)

         (message "%s: Non JSON data because of a server side exception. See %s"
                  (error-message-string err) org-redmine-curl-buffer))))))

(defun org-redmine-curl-args (uri)
  (let ((args '("-X" "GET" "-s" "-f")))
    (append

                  . (lambda (issue) (org-redmine-insert-subtree issue)))))))
   ))

(defun org-redmine-update-issue ()
  ""
  (interactive)
  (let (org-issue issue)
    (condition-case err
        (progn
          (setq org-issue (org-redmine-jsonize-issue (org-redmine-cur-org-issue)))
          (setq issue (org-redmine-curl-post
                       (format "%s/issues.json" org-redmine-uri) org-issue ))
          (org-cut-subtree)
          (org-redmine-insert-subtree (orutil-gethash issue "issue")))
          ;;(yank)

      
      (org-redmine-exception-not-retrieved
       (orutil-print-error
        (format "%s: Can't update issue #%s on %s"
                (error-message-string err) issue-id org-redmine-uri))))))

(provide 'org-redmine)

;;; org-redmine.el ends here
