3

I would like to have summed up logged time with org-columns in org-mode. Apparently it works very well down to level 3 headers (i.e. headers with 3 asterisk), but when I try to log clock for level 4 headers I encounter the following error upon entering org-columns:

The CLOCKSUM property cannot be set with ‘org-entry-put’

I get the same error message when I try to set by hand the property CLOCKSUM for level 4 sub-headers. Please see a working example below. Trying to update the first columnview table with :id global or generating org-columns for Goal 3 will reproduce the error while Goal 1 and Goal 2 are fine (they do not have level 4 sub-headers with logged clocks).

Anyone knows how to fix this?

#+TITLE: Page planning example
#+PROPERTY: Effort_ALL "" 0:05 0:10 0:20 0:30 1:00 2:00 4:00 6:00 8:00
#+PROPERTY: Estimated_days_ALL "" 1 2 3 4 5 6 7 8 9 10 11
#+COLUMNS: %25ITEM(Details) %25TAGS(Context) %7TODO(To Do) %5Effort(Estimate){:} %6CLOCKSUM{:} %10Budget_day(Daily budget){:} %10Estimated_days(Estimated Days){est+}


#+BEGIN: columnview :hlines 2 :id global :maxlevel 2

#+END

* Goal 1
  :PROPERTIES:
  :BUDGET_DAY: 6:00
  :ID: goal_1
  :END:

  #+BEGIN: columnview :hlines 3 :id goal_1 :Maxlevel 4
  | Details         | Context | To Do | Estimate | CLOCKSUM | Daily budget | Estimated Days |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | Goal 1          |         |       |     1:20 |     3:51 |         6:00 |          11-13 |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | Project 1       |         |       |     0:20 |     3:51 |         4:00 |            5-7 |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | Task 1          |         | TODO  |     0:15 |     1:11 |              |            4-5 |
  | Desired outcome |         |       |          |          |              |                |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | task 2          |         | TODO  |     0:05 |     0:10 |              |            1-2 |
  | Desired outcome |         |       |          |          |              |                |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | task 3          |         | TODO  |          |     2:30 |              |                |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | Project 2       |         |       |     1:00 |          |         2:00 |            6-6 |
  |-----------------+---------+-------+----------+----------+--------------+----------------|
  | Task 1          |         | TODO  |     1:00 |          |              |              6 |
  #+END


** Project 1 
   :PROPERTIES:
   :Budget_day+: 4:00
   :END:

*** TODO Task 1
   :PROPERTIES:
   :Estimated_days: 4-5
   :Effort:   0:15
   :END:
   :LOGBOOK:
   CLOCK: [2020-01-27 Mon 19:05]--[2020-01-27 Mon 20:16] =>  1:01
   :END:
**** Desired outcome


*** TODO task 2
    :PROPERTIES:
    :Effort:   0:05
    :Estimated_days: 1-2
    :END:
    :LOGBOOK:
    CLOCK: [2020-01-28 Tue 14:52]--[2020-01-28 Tue 15:02] =>  0:10
    :END:
**** Desired outcome

*** TODO task 3
    :LOGBOOK:
    CLOCK: [2020-01-28 Tue 12:22]--[2020-01-28 Tue 14:52] =>  2:30
    :END:
    :DEADLINE: <2020-02-02>

*** COMMENT PROJECT META
**** Desired outcome
     Write out outcome of project 1
**** Main folder

** Project 2
   :PROPERTIES:
   :Budget_day+: 2:00
   :END:

*** COMMENT PROJECT META
**** Desired outcome
     Write out outcome of project 1
**** Main folder


*** TODO Task 1
    :PROPERTIES:
    :Effort:   1:00
    :Estimated_days: 6
    :END:

** COMMENT Meta

*** Description of the goal
*** Desired outcome
    Write out outcome of the goal


* Goal 2
  :PROPERTIES:
  :ID: goal_2
  :END:

  #+BEGIN: columnview :hlines 2 :id goal_2 :maxlevel 3
  | Details   | Context | To Do | Estimate | CLOCKSUM | Daily budget | Estimated Days |
  |-----------+---------+-------+----------+----------+--------------+----------------|
  | Goal 2    |         |       |    10:20 |     0:01 |         2:49 |           4-14 |
  |-----------+---------+-------+----------+----------+--------------+----------------|
  | Project 1 |         |       |     8:20 |     0:01 |        00:49 |           2-12 |
  | Task 1    |         | TODO  |    08:15 |     0:01 |              |            1-2 |
  | Task 2    |         | TODO  |     0:05 |          |              |           1-10 |
  |-----------+---------+-------+----------+----------+--------------+----------------|
  | Project 2 |         |       |     2:00 |          |        02:00 |            2-2 |
  | Task 1    |         | TODO  |     2:00 |          |              |              2 |
  #+END


** Project 1 
   :PROPERTIES:
   :Budget_day+: 00:49
   :END:


*** TODO Task 1
   :PROPERTIES:
   :Estimated_days: 1-2
   :Effort:   08:15
   :END:
   :LOGBOOK:
   CLOCK: [2020-01-27 Mon 19:15]--[2020-01-27 Mon 19:16] =>  0:01
   :END:

   Task body
**** Eventual sub-task 1
**** Desired outcome
*** TODO Task 2
    :PROPERTIES:
    :Effort:   0:05
    :Estimated_days: 1-10
    :END:
    Task body
**** Desired outcome

*** COMMENT PROJECT META
**** Desired outcome
     Write out outcome of project 1
**** Main folder

** Project 2
   :PROPERTIES:
   :Budget_day+: 02:00
   :END:

*** COMMENT PROJECT META
**** Desired outcome
     Write out outcome of project 1
**** Main folder


*** TODO Task 1
    :PROPERTIES:
    :Effort:   2:00
    :Estimated_days: 2
    :END:

** COMMENT GOAL META

*** Description of the goal
*** Desired outcome
    Write out outcome of the goal



* Goal 3
  :PROPERTIES:
  :ID: goal_3
  :END:

  #+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 4

  #+END

** Project 1 
   :PROPERTIES:
   :Budget_day+: 00:49
   :END:


*** TODO Task 1
   :PROPERTIES:
   :Estimated_days: 1-2
   :EFFORT:   0:05
   :END:
   :LOGBOOK:
   CLOCK: [2020-01-26 18:05]--[2020-01-26 Mon 19:16] =>  1:11
   :END:

   Task body

**** TODO Subtask 1
   :PROPERTIES:
   :Estimated_days: 1-2
   :EFFORT:   0:05
   :END:
     :LOGBOOK:
     CLOCK: [2020-01-28 Tue 15:45]--[2020-01-28 Tue 16:45] =>  1:00
     :END:
5
  • A similar error message shows up when trying to insert a property with key equal to CLOSED through the org-entry-put function (i.e. press <kbd>c-c c-x p</kbd> while the cursor is in an entry). The error message is: the CLOSED property cannot be set with 'org-entry-put'.
    – gfe
    Jul 19, 2020 at 18:28
  • The level doesn't seem to relevant. Changing the level of the subtask gives the same error. On the other hand adding a new subtask below the given one, no longer gives an error. Mar 7, 2021 at 13:45
  • Apparently this bug first cropped up in 2012. lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00309.html
    – hartshoj
    Mar 25, 2021 at 0:32
  • I don't think it's a bug. CLOCKSUM (and CLOSED) are special properties and "should not" be used as keys in property drawers. org-entry-put actually forbids setting them (although of course, "it's just text" so you can do whatever you want - but if you break the rules, Org mode may not do TRT). The example in the question works (?) for me (in the sense that I get a table and I don't get an error) with Org mode 9.4.4+.
    – NickD
    Apr 5, 2021 at 15:58
  • I take back the last part of my previous comment: the example does not work for me either. I get the CLOCKSUM property error.
    – NickD
    Apr 5, 2021 at 16:45

2 Answers 2

1

I couldn't get the MWE to run, but rewriting %6CLOCKSUM{:} as %6CLOCKSUM solved the problem for me in a similar situation.

1
  • This fixed the problem, thank you!
    – 01000001
    May 20, 2021 at 5:44
-1

The description of the special property ‘CLOCKSUM’ contains a hint that "[...] ‘org-clock-sum’ must be run first to compute the values in the current buffer".

Eval'ing (org-clock-sum) in the buffer solved the issue for me.

3
  • Please explain more exactly what needs to be done. Trying to reproduce the actions did not lead to a solution in my copy of the org file. Mar 7, 2021 at 13:37
  • I'm not even sure how to do this. How do you evaluate an elisp function within an org buffer?
    – hartshoj
    Mar 25, 2021 at 0:30
  • C-c C-c on each #+BEGIN: columnview should be enough: it's supposed to run org-clock-sum. You should not have to (and probably should not) call org-clock-sum explicitly.
    – NickD
    Apr 5, 2021 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.