scripts
scripts copied to clipboard
Journal Entry Script Inserts Wrong File Name (eg. Note 12a742c7-e7e8-4e88-95ee-cca2ecb0b274)
Script name
Journal entry
Expected behaviour
I believe the intent of the script is to create a new note in a specified folder with the default file name of: "Journal " + m.getFullYear() + ("0" + (m.getMonth()+1)).slice(-2) + ("0" + m.getDate()).slice(-2);
eg. Journal 20210919
Actual behaviour
What happens when I click the New Journal Entry button in the Qownnotes interface is, a new journal file is created, but without the "Journal 20210919" name.
Instead, a new note is created with the file name of: Note 12a742c7-e7e8-4e88-95ee-cca2ecb0b274
etc. etc.
Steps to reproduce
- Install Journal Entry script
- Use New Journal Entry button
- See new journal created with your template, in proper directory, but with the wrong name.
Output from the debug section in the settings dialog
## General Info
**Current Date**: `Sun Sep 19 12:06:42 2021`
**Version**: `21.9.4`
**Build date**: `Sep 12 2021`
**Build number**: `881`
**Platform**: `linux`
**Operating System**: `Debian GNU/Linux 10 (buster)`
**Build architecture**: `x86_64`
**Current architecture**: `x86_64`
**Release**: `OBS`
**Qt Version (build)**: `5.11.3`
**Qt Version (runtime)**: `5.11.3`
**Portable mode**: `no`
**Settings path / key**: `/home/patrick/.config/PBE/QOwnNotes.conf`
**Application database path**: `/home/patrick/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite`
**Application arguments**: `/usr/bin/QOwnNotes`
**Qt Debug**: `0`
**Locale (system)**: `en_CA`
**Locale (interface)**: *empty*
**Primary screen resolution**: `1920x1080`
**Screen resolution(s)**: `1920x1080, 1920x1080`
**Icon theme**: `breeze-dark-qownnotes`
**Notes in current note folder**: `51`
**Calendar items**: `11`
**Enabled scripts**: `2`
### Script `Journal entry`
**id**: `1`
**path**: `/home/patrick/.local/share/PBE/QOwnNotes/scripts/journal-entry/journal-entry.qml`
**variablesJson**:
{
"defaultFolder": "Daily",
"defaultTags": "journal",
"noteBodyTemplate": "Today... ",
"singleJournalPerDay": true
}
**identifier**: `journal-entry`
**version**: `1.5.1`
**minAppVersion**: `17.11.6`
Relevant log output in the Log panel
[12:05:13] [scripting] creating new journal entry: Journal 20210919 [12:05:13] [scripting] Attempt: Jump to default folder 'Daily' before creating a new journal note. [12:05:13] [scripting] Success: Jump to default folder 'Daily' before creating a new journal note. [12:05:13] [status] Stored current note to disk [12:05:13] [scripting] Tag the new journal note with default tag: journal [12:05:18] [status] Stored 1 note(s) to disk
Any ideas here?
@sanderboom
@patrickbolle, you didn't share your settings. Are you using the settings where you can change the filename of the notes?
Seems like this script lacks what I did in https://github.com/qownnotes/scripts/commit/6fa8cf0309b3a86fba80277775da6ac840e1baff.
@patrickbolle, I blindly tried to fix your issue. Can you please test the new version of the script.
I will close this issue until there is more information.
It's always been like this for me:
- click the new journal entry button
- a note with hash shows up
- after 1-2 seconds the name is changed to the right name
@sanderboom, are you using the allowDifferentNoteFileName
setting for your note folder?
@sanderboom, are you using the
allowDifferentNoteFileName
setting for your note folder?
Ah, I see it now - so probably this is the reason/difference :heavy_check_mark:
Yes, it is. 😅
The current version of the script should be able to handle this.
I guess this can be closed?