1

I am working on an OrgMode Scrum workflow that works well for me. One thing that would make it easier is the ability to designate specific properties as inheritable. This is because in my scheme tasks belong to stories and are represented as sub-headings of story headings. One would like to assign a unique story ID to each story and then have each task inherit the story's ID.

I know how to do this for ALL properties by setting org-use-property-inheritance to t as shown below, and I can confirm that it works. However, I cannot get it to work for just a specific set of properties.

Unfortunately, I cannot get my target properties to be inherited by using org-use-property-inheritance: '(STORYID TASKID) or any modification such as double quoting STORYID and TASKID. Per the documentation, you should be able to set org-use-property-inheritance to a list of properties.

Try the Org doc below. Switch between

# -*- mode: Org; org-use-property-inheritance: t -*-

and

# -*- mode: Org; org-use-property-inheritance: '(STORYID TASKID) -*-

or

# -*- mode: Org; org-use-property-inheritance: '("STORYID" "TASKID") -*-

and refresh the dblock every time by placing the point on the #+BEGIN: line and hitting C-c C-c to refresh the table. You will notice that only setting org-use-property-inheritance works as expected. This may or may not be acceptable behavior in certain use cases.

# -*- mode: Org; org-use-property-inheritance: t -*-

*** Sample Stories (both active and completed, taken from backlog)
    :PROPERTIES:
    :COLUMNS:  %TODO(Status) %STORYID %TASKID %30ITEM(Task) %OWNER %Effort{:} %Spent{:} %Date %Sprint %45Alltags(Sprints)
    :Sprint_ALL: Sprint1 Sprint2 Sprint3 Sprint4
    :Owner_ALL: pablo john
    :END:
    
    As you can see below, you can report on all the stories by limiting the detail
    displayed using the ~:maxlevel~ directive to skip the headings used to report spent
    effort.

    #+BEGIN: columnview :hlines 4 :id local :indent t :maxlevel 6
    | Status | STORYID | TASKID  | Task                                                                 | OWNER | Effort | Spent | Date             | Sprint  | Sprints           |
    |--------+---------+---------+----------------------------------------------------------------------+-------+--------+-------+------------------+---------+-------------------|
    |        |         |         | \_    Sample Stories (both active and completed, taken from backlog) |       |   9:30 |  5:30 |                  |         |                   |
    |--------+---------+---------+----------------------------------------------------------------------+-------+--------+-------+------------------+---------+-------------------|
    | TODO   | Story1  |         | \_      Story 1                                                      |       |   4:30 |       |                  |         | :Sprint1:Sprint2: |
    | TODO   | Story1  | Task1.1 | \_        Task 1.1                                                   | pablo |  01:00 |       |                  |         | :Sprint1:Sprint2: |
    | TODO   | Story1  | Task1.2 | \_        Task 1.2                                                   | john  |  02:00 |       |                  |         | :Sprint1:Sprint2: |
    | TODO   | Story1  | Task1.3 | \_        Task 1.3                                                   | pablo |  01:30 |       |                  |         | :Sprint1:Sprint2: |
    |--------+---------+---------+----------------------------------------------------------------------+-------+--------+-------+------------------+---------+-------------------|
    | TODO   | Story2  |         | \_      Story 2                                                      |       |   3:00 |  3:00 |                  |         | :Sprint1:Sprint2: |
    | TODO   | Story2  | Task2.1 | \_        Task 2.1                                                   | pablo |  01:00 |       |                  |         | :Sprint1:Sprint2: |
    | TODO   | Story2  | Task2.1 | \_        Task 2.2                                                   |       |  01:00 |  3:00 |                  |         | :Sprint1:Sprint2: |
    |        | Story2  | Task2.1 | \_          Report                                                   |       |  01:00 | 01:00 | [2020-12-20 Sun] | Sprint1 | :Sprint1:Sprint2: |
    |        | Story2  | Task2.1 | \_          Report                                                   |       |  01:00 | 01:00 | [2020-12-18 Fri] | Sprint2 | :Sprint1:Sprint2: |
    |        | Story2  | Task2.1 | \_          Report                                                   |       |  01:00 | 01:00 | [2020-12-17 Thu] | Sprint1 | :Sprint1:Sprint2: |
    | TODO   | Story2  | Task2.2 | \_        Task 2.3                                                   | john  |  01:00 |       |                  |         | :Sprint1:Sprint2: |
    |--------+---------+---------+----------------------------------------------------------------------+-------+--------+-------+------------------+---------+-------------------|
    | TODO   | Story3  |         | \_      Story 3                                                      |       |   2:00 |  2:30 |                  |         | :Sprint3:Sprint4: |
    |        | Story3  | Task3.1 | \_        Task 3.1                                                   | pablo |  01:00 |       |                  |         | :Sprint3:Sprint4: |
    | TODO   | Story3  | Task3.1 | \_        Task 3.1                                                   | pablo |  01:00 |  2:30 |                  |         | :Sprint3:Sprint4: |
    |        | Story3  | Task3.1 | \_          Report                                                   |       |  01:00 | 01:00 | [2020-12-20 Sun] | Sprint3 | :Sprint3:Sprint4: |
    |        | Story3  | Task3.1 | \_          Report                                                   |       |  01:00 | 01:30 | [2020-12-25 Fri] | Sprint2 | :Sprint3:Sprint4: |
    #+END:

    You could also create story-specific dblocks to see how effort was spent on a specific
    story.
**** TODO Story 1                                           :Sprint1:Sprint2:
     :PROPERTIES:
     :STORYID:  Story1
     :END:
***** TODO Task 1.1
      :PROPERTIES:
      :OWNER:    pablo
      :EFFORT:   01:00
      :SPRINT:
      :TASKID:   Task1.1
      :END:
***** TODO Task 1.2
      :PROPERTIES:
      :OWNER:    john
      :EFFORT:   02:00
      :TASKID:   Task1.2
      :END:
***** TODO Task 1.3
      :PROPERTIES:
      :OWNER:    pablo
      :EFFORT:   01:30
      :TASKID:   Task1.3
      :END:
**** TODO Story 2                                           :Sprint1:Sprint2:
     :PROPERTIES:
     :STORYID:  Story2
     :END:
***** TODO Task 2.1
      :PROPERTIES:
      :OWNER:    pablo
      :EFFORT:   01:00
      :TASKID:   Task2.1
      :END:
***** TODO Task 2.2
      :PROPERTIES:
      :EFFORT:   01:00
      :TASKID:   Task2.2
      :OWNER:    pablo
      :END:
      :LOGBOOK:
      - State "TODO"       from              [2020-12-20 Sun 19:46]
      :END:
****** Report
       :PROPERTIES:
       :SPENT:    01:00
       :Date: [2020-12-20 Sun]
       :SPRINT:   Sprint1
       :END:
****** Report
       :PROPERTIES:
       :DATE:     [2020-12-18 Fri]
       :SPRINT:   Sprint2
       :SPENT:    01:00
       :END:
****** Report
       :PROPERTIES:
       :DATE:     [2020-12-17 Thu]
       :SPRINT:   Sprint1
       :SPENT:    01:00
       :END:
***** TODO Task 2.3
      :PROPERTIES:
      :OWNER:    john
      :EFFORT:   01:00
      :TASKID:   Task2.3
      :END:
**** TODO Story 3                                           :Sprint3:Sprint4:
     :PROPERTIES:
     :STORYID:  Story3
     :END:
***** TODO Task 3.1
      :PROPERTIES:
      :OWNER:    pablo
      :EFFORT:   01:00
      :SPRINT:
      :TASKID:   Task3.1
      :END:
      :LOGBOOK:
      - State "TODO"       from              [2020-12-21 Mon 00:08]
      :END:
***** TODO Task 3.2
      :PROPERTIES:
      :TASKID:   Task3.2
      :OWNER:    pablo
      :EFFORT:   01:00
      :END:
****** Report
       :PROPERTIES:
       :SPENT:    01:00
       :DATE: [2020-12-20 Sun]
       :SPRINT:   Sprint3
       :END:
****** Report
       :PROPERTIES:
       :DATE:     [2020-12-25 Fri]
       :SPRINT:   Sprint2
       :SPENT:    01:30
       :END:
2

Try

# -*- mode: Org; org-use-property-inheritance: ("FOO" "BAR") -*-

Property names are strings, so you need a list of strings. But when you are setting file local variables either at the top of the file as you do above or in a Local Variables block at the end of the file, you should not quote values. The section of the manual in the link above says:

The values are used literally, and not evaluated.

As an example, in the Org mode file

# -*- mode: Org; org-use-property-inheritance: ("FOO" "BAR") -*-
* foo
:PROPERTIES:
:FOO:      foo
:OTHER:    other
:END:
** foo subtree
#+begin_src emacs-lisp :results drawer
(org-entry-get (point) "FOO" 'selective)
#+end_src

#+RESULTS:
:results:
foo
:end:

#+begin_src emacs-lisp :results drawer
(org-entry-get (point) "OTHER" 'selective)
#+end_src

#+RESULTS:
:results:
nil
:end:

the property FOO is inherited from the parent in the subtree, but the property OTHER is not.

1
  • Wow! And the issue was that I added a single quote before the list. I did try to double quote the property names, but the single quote before the list created a problem. Thanks. This is very helpful. – Pablo A Perez-Fernandez Dec 23 '20 at 15:19

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.