GTG

Save editor content after timeout

Bug #1072847 reported by Brian Teague
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
High
Unassigned

Bug Description

Current state:
1. Create a new task; set its name, wait 10 seconds, internal title of the task is "(no title task)"
2. Type "one" into the body. Wait 10 seconds, title of the task is "A new task" without set content
3. Type "two" on the next line of the body. Wait 10 seconds, the content is "One\nT"
4. Close GTG. the full task has been saved.

Expected behavior:
The correct behavior should be that after some timeout when a task is not written, the content is saved. If you don't press anything for a second (and you made changes), save the content. Or maybe when the window loses focus, save changes.

Tags: editor
Revision history for this message
Brian Teague (bteague) wrote :

Note: Closing the task (instead of quitting GTG entirely) also results in the full task being written to the backend.

I'm not a hair-on-fire kind of bug reporter, but if GTG crashed before you closed the task, this could result in data loss.

Revision history for this message
Izidor Matušov (izidor) wrote :

I can confirm this behavior and I can agree it is bad. However, it is only a matter of editor. Try to change e.g. a due date from the browser from the context menu - the changes are reflected immediately.

Changed in gtg:
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.3.1
status: Confirmed → Incomplete
Revision history for this message
Izidor Matušov (izidor) wrote :

Can you confirm that?

Revision history for this message
Brian Teague (bteague) wrote :

Confirmed. The problem seems to be isolated to the "content" field of the editor; changes to the metadata (due data, subtasks, tags, etc), made either in the editor or the browser, are reflected immediately.

Changed in gtg:
status: Incomplete → Confirmed
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

This is not a bug but a feature : there's a timeout of a few seconds to avoid saving the content at each and every letter typed.

The possible data loss (which already happened to me in testing) is then only limited to a few characters or one sentence at worst.

Revision history for this message
Izidor Matušov (izidor) wrote :

Lionel > No, it is a bug. Imagine a following use case (which happened to me several times):

You open a new task and write down the title of the task (without pressing <enter>). Switch to the browser to find more details and forget about the task. In the evening restart computer without closing the task. The next morning, you find a "(no title)" task :/

The correct behavior should be that after some timeout when a task is not written, the content is saved. If you don't press anything for a second (and you made changes), save the content. Or maybe when the window loses focus, save changes.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Ah, ok. I understand. And, indeed, I remember this bug. We should then have something periodically checking for open tasks and, if modified and unsaved, saving them.

Izidor Matušov (izidor)
summary: - Sync backends (including local file) don't stay in sync
+ Save editor content after timeout
description: updated
Revision history for this message
Izidor Matušov (izidor) wrote :

I updated title & bug description

tags: added: editor
Izidor Matušov (izidor)
Changed in gtg:
milestone: 0.3.1 → 0.4
Jeff Fortin Tam (kiddo)
Changed in gtg:
status: Confirmed → Fix Committed
Jeff Fortin Tam (kiddo)
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.