From bfdb96b0646eac2174d3ac632986e97e45711225 Mon Sep 17 00:00:00 2001
From: Mamoru Miura <mamo3gr@gmail.com>
Date: Wed, 20 Jul 2022 07:06:32 +0900
Subject: [PATCH] lisp/org-colview.el: Fix missing addition of appointments to
 effort

* lisp/org-colview.el (org-columns--collect-values): re-compute
appointments' duration because this funtion can not get text property
`'duration'.

TINYCHANGE
---
 lisp/org-colview.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 13643101b..eae09e096 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -288,10 +288,9 @@ possible to override it with optional argument COMPILED-FMT."
 			     ;; to use appointment duration.
 			     org-agenda-columns-add-appointments-to-effort-sum
 			     (string= p (upcase org-effort-property))
-			     (get-text-property (point) 'duration)
-			     (propertize (org-duration-from-minutes
-					  (get-text-property (point) 'duration))
-					 'face 'org-warning))
+			     (when-let* ((formatted-item (org-agenda-format-item nil (org-get-entry) nil nil nil t))
+			                 (duration-string (get-text-property 0 'duration formatted-item)))
+			       (propertize (org-duration-from-minutes duration-string) 'face 'org-warning)))
 			"")))
 	    ;; A non-nil COMPILED-FMT means we're calling from Org
 	    ;; Agenda mode, where we do not want leading stars for
-- 
2.37.0

