emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Ristow <alan@ristow.info>
To: emacs-orgmode@gnu.org
Subject: Bug: Unexpected behavior marking recurring tasks as DONE
Date: Wed, 7 Jul 2021 11:50:36 +0200	[thread overview]
Message-ID: <948ada33-e0bf-5e00-0d03-e7d243d87090@ristow.info> (raw)

I recently updated org from 9.3 (release_9.3) to 9.4.6 (9.4.6-gfdb98a) 
and observed several changes in behavior when marking recurring tasks as 
DONE. I have not found reports of anything similar via Google or the 
mailing list archives, so rather than a bug it might be a package 
conflict or a configuration issue; in any case, I am having a really 
tough time figuring it out and I hope somebody here might be able to 
give me some pointers.

I use straight.el for package management and as part of this update I 
had to switch from using org-plus-contrib to using org-contrib. 
Normally, straight.el would make it easy for me to go back to my old 
configuration -- I have the lockfile with all the package versions -- 
but because of the movement in org repos and the change from 
org-plus-contrib to org-contrib, I am running into difficulty doing 
that, which probably contributes to my difficulties in troubleshooting.


EXPECTED (FORMER) BEHAVIOR

Suppose I have a task that looks like this:

** TODO Daily review
    SCHEDULED: <2021-07-07 Wed .+1d>
    :PROPERTIES:
    :LAST_REPEAT: [2021-07-06 Tue 10:03]
    :END:
    :LOGBOOK:
    - State "DONE"       from "TODO" [2021-07-06 Tue 10:03]
    :END:

I then do the following:

1. Move the cursor to the TODO line and mark it DONE (t-x in agenda
    view, C-t x in the file buffer).
2. The scheduled date is updated to the next recurrence, and the
    current time is recorded in the LAST_MODIFIED property drawer and in
    the LOGBOOK.

After, the task looks like this:

** TODO Daily review
    SCHEDULED: <2021-07-08 Thu .+1d>
    :PROPERTIES:
    :LAST_REPEAT: [2021-07-07 Wed 11:18]
    :END:
    :LOGBOOK:
    - State "DONE"       from "TODO" [2021-07-07 Wed 11:18]
    - State "DONE"       from "TODO" [2021-07-06 Tue 10:03]
    :END:

I get the same result when the task is marked as a habit and also when I 
bulk-process tasks from the agenda view using org-agenda-bulk-action.


ACTUAL (CURRENT) BEHAVIOR

I have observed two changes in behavior since updating to org 9.4.6 and 
org-contrib.

First, if I do exactly the same as above, the time of completion is 
logged twice:

** TODO Daily review
    SCHEDULED: <2021-07-08 Thu .+1d>
    :PROPERTIES:
    :LAST_REPEAT: [2021-07-07 Wed 11:18]
    :END:
    :LOGBOOK:
    - State "DONE"       from "TODO" [2021-07-07 Wed 11:18]
    - State "DONE"       from "TODO" [2021-07-07 Wed 11:18]
    - State "DONE"       from "TODO" [2021-07-06 Tue 10:03]
    :END:

Second, if I bulk-process a habit via org-agenda-bulk-action, the task 
is simply marked DONE. Bot the recurrence and the LAST_REPEAT field are 
ignored, but the time stamp is only entered into the LOGBOOK once:

** DONE Walk
    CLOSED: [2021-07-07 Wed 11:26] SCHEDULED: <2021-07-07 Wed .+1d>
    :PROPERTIES:
    :STYLE:  habit
    :LAST_REPEAT: [2021-07-06 Tue 15:33]
    :END:
    :LOGBOOK:
    - State "DONE"       from "TODO" [2021-07-07 Wed 11:26]
    - State "DONE"       from "TODO" [2021-07-06 Tue 15:33]
    :END:


MY CONFIGURATION

The extensions to org that I load are: org-super-agenda, org-superstar, 
org-capture, org-tempo, org-checklist, org-habit, helm-org-rifle, 
org-drill, ox-pandoc, org-make-toc, org-ql, org-roam, org-journal, 
org-ref, org-ref-helm-bibtex, and org-roam-bibtex. All are the latest 
versions accessible to straight.el.

My init.el includes the following:

   (setq org-log-done 'time
         org-log-redeadline 'time
         org-log-reschedule 'time
         org-log-into-drawer t
org-log-state-notes-insert-after-drawers nil)
   (setq org-todo-keywords
         '((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "WAITING(w@/!)" 
"|" "DONE(x!)" "DELEGATED(d@)")
           (sequence "DEFERRED(f@/!)" "INACTIVE(i@/!)" "|" "CANCELED(c@)")))


Best regards,
Alan



             reply	other threads:[~2021-07-07  9:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  9:50 Alan Ristow [this message]
2021-07-07 18:20 ` Bug: Unexpected behavior marking recurring tasks as DONE Alan Ristow
2021-07-08 18:19   ` Bhavin Gandhi
2021-07-09  7:47     ` Alan Ristow
2021-07-12 20:00       ` Allen Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=948ada33-e0bf-5e00-0d03-e7d243d87090@ristow.info \
    --to=alan@ristow.info \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).