Hi Thomas,
thanks a lot for taking a look at the new feature and spending time testing it!
The rules-editor looks somewhat lost, when you open it for the first time. Maybe you want to add some rules as suggestions, which are deactivated by default.
Good idea. The problem is, what rules should that be? Do you think that the "has remarks /attachments" rules are good candidates here?
Actually I have an idea that in future versions CN could analyze existing notes and suggest to create rules if it sees very strong correlations between certain tags (sections) and note components (e.g. the site domain in the Link field).
The dialog is modal, which prevents me from checking notes. However, when i create a rule, i might want to read my notes to better understand on how to create a rule.
I guess the dialog with the rules list can be made non-modal without any problems. Will fix that, thanks.
Add a confirmation dialog, when closing the rule editor. For example "Apply rules now?". Executing rules can have a huge impact. Especially as there is no undo. I need to remember myself to create a backup, before applying rules.
Valid point. Agreed.
Allow me to save rules without applying them immediately.
If I add the confirmation dialog, this item will be taken care of as well.
Instead add a button "Apply rules" inside the rule editor.
Should it re-apply ALL rules, or only selected ones? Re-applying ALL rules to ALL notes can be massive, especially if rules have some heavy conditions like "any text field contains.."
Another request is to add a button "create backup now" inside the rule editor or add a confirmation-dialog "create backup", when i click "OK". Maybe add a checkbox "[X] create backup before applying rules".
I'm not exactly sure that creating extra backups is the right way to go. This is inconsistent: when notes are added or changed, rules are applied as well, but no backups will be created. Also, creating so many backups can quickly fill up some SSDs.
But I agree that it's better to be on the safe side here. So I think I'll add an on-by-default checkbox to create backup to the "Rules changed - apply to existing notes?" confirmation box we discussed earlier.
Add a menu item "Notebook\Apply rules".
So one menu will have both "Rules" and "Apply rules"? Seems a bit redundant to me..
I tried to simulate the exclusive tag feature, which is on the roadmap, but failed to do so. The reason is, that an "on-event" action is not possible. For example, on adding tag "tasks/completed" remove any other tag "tasks/*". Of course there is another issue with this. Right now rules are executed on saving a note only, what i am asking for is an event driven management of rules inside the editor. An option might be to have a shortcut, that triggers rules execution. That way i could assign a tag "Delphi", which then would assign the section to "Development" by applying the rule. In other words applying rules on saving a note might be to late, as i want to check the results before saving a note.
Not sure I understand which feature you're talking about, could you please post a link to the roadmap issue?
Applying rules in event-driven way is an interesting idea, but I'm afraid too complex to implement well. It can easily drive you mad if note section will change or some additional tags will start to appear as you are editing a note. I don't quite understand why you don't want to press Ctrl+S to see the rules applied?
Add an option to apply rules to new notes only. For example "if Any text field contains "Delphi" add tag "Delphi" and move to section "Development". That would allow for changing the section to something different after saving the note the very first time.
If you have a designated section for new notes, this is already possible - you can add "Section = 'MyInbox'" condition to the rule.
(Or you can use the note's Untagged status for this).
Also there's a problem with correctly defining what is a new note. Say CN downloads a note from Simplenote - is it a new note or not?
Now we have rule execution when confirming the rules editor dialog (acting on the entire notebook) and when saving notes (acting on the active note only). I also understand that first time i save a new note, rules are applied.
Yes. The only exception - if you have "After Clipping / Open in editor" option set, the rules are applied to the note even before the new note is saved.
Thereafter mode changes to editing while i keep on editing the note inside the editor. Maybe a "on delete note" is of interest. One could add a rule to move a note to a section "archive", rather than deleting it to recycle-bin. Even when the user presses "Ctrl+Del".
Deleting a note can be viewed as a way of modifying it, so I don't see why this couldn't be implemented. However frankly I'm doubtful of the usefulness of such rules.
Applying rules on notes that haven't changed can give unexpected results. For example i had added a rule "if tags "have all of" "Delphi" move to section "Development". That would have changes 108 notes. However, only 92 were correct. The other 16 notes were located in other sections, which i don't want to change!!! In other words doing global assignment is dangerous.
By creating such a rule, you're effectively saying to CN: "I want all notes with the tag 'Delphi' to be always located in the 'Development' section".
And it does what you tell it to do.
If you want only _some_ of the notes to be analyzed, you need to say it: "If section is "UnsortedNotes" and tags have all of 'delphi'..."
When opening notes in the editor it sometimes happens, that the note changes without having me actually editing it. This is related due to bugs we have seen in the past. In such cases, i don't want the rule-tags to be executed. They should run only, when the user actively modified the note.
Agreed, I'll see to it that the rules are only run when note is changed in such a way that it's modified date changes.
off topic: Please include the settings-file for creating a backup of the database. This is especially important when running tests.
Sorry, don't quite get what you mean here. The backup settings are per-notebook, and are stored in the notebook, not settings file.
I am ware, this is quite a list. It took me some time for testing and writing down the issues. It might not have the quality of my earlier posts. Feel welcome to ask on issues which are unclear.
Huge thanks for this list, Thomas, it will definitely help to make the feature more user-friendly and production-ready!
I see it as follows: this feature, if implemented well, can become the killer feature of CN (and will allow us to make SN sync and attachments free). But implemented poorly, it will ruin everything.