The little script below clears every flag in the database. It works, but seems to expose a bug in OF's display code. To wit:
1. Switch to a project mode window.
2. Flag a project or single action list.
3. Run the script and choose "Yes" to clear flags.
4. All flags will be cleared in the database, but the project or SAL flagged in step 2 will still show a flag. Its children, however, will not show flags.
5. Switch to context mode, then back to project mode.
6. The flag will no longer appear on the project or SAL from step 2.
[Also submitted as feedback.]
1. Switch to a project mode window.
2. Flag a project or single action list.
3. Run the script and choose "Yes" to clear flags.
4. All flags will be cleared in the database, but the project or SAL flagged in step 2 will still show a flag. Its children, however, will not show flags.
5. Switch to context mode, then back to project mode.
6. The flag will no longer appear on the project or SAL from step 2.
[Also submitted as feedback.]
Code:
try set theResponse to display dialog "Really clear every flag in the OmniFocus database?" buttons {"Yes", "No"} default button "No" cancel button "No" with title "Clear Every Flag?" with icon caution on error return end try tell application "OmniFocus" tell front document set flagged of (every flattened task whose flagged is true) to false end tell end tell
__________________
Cheers,
Curt
Cheers,
Curt