YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
359 stars 25 forks source link

Create Event Note problem with properties #191

Closed panter-dsd closed 11 months ago

panter-dsd commented 11 months ago

Hi! I've faced a problem with new properties in obsidian. I have this template:

Screenshot 2023-09-19 at 10 29 44

And when I use this template for an event note creation I get

Screenshot 2023-09-19 at 10 30 27

I've recorded a video with this bug:

https://github.com/YukiGasai/obsidian-google-calendar/assets/208976/287cbbb4-a60f-4369-8a3d-6ac139629226

YukiGasai commented 11 months ago

Hi, can you please show me the template in pure source mode? You can change this in Settings → Editor → "Properties in document" = Source. It looks like your template contains two frontmatter sections.

panter-dsd commented 11 months ago
---
date: <% tp.date.now("YYYY-MM-DD") %>
---
<% tp.file.rename(tp.date.now("YYYY-MM-DD") + ' ' + tp.file.title) %>
🏷️Tags: #meeting 
📅Date: `= this.date`
👥Participants: [[Konstantin Konnov]]

# Agenda

# Notes
panter-dsd commented 11 months ago

And the created event

---
event-id: 0us19egojc8oapt4k3cnnsb82p_20230919T073000Z
---
---
date: 2023-09-19
---

🏷️Tags: #meeting 
📅Date: `= this.date`
👥Participants: [[Konstantin Konnov]]

# Agenda

# Notes
YukiGasai commented 11 months ago

Thank you, I was able to reproduce and I think is related to #168. I will to fix it now ^^.

YukiGasai commented 11 months ago

If you want a quick fix for yourself, you have to add event-id manually to the fields, like shown in the related issue.

panter-dsd commented 11 months ago

Oh, it's not a problem right now. But I'll wait a fix. It's a bit bothering when you have to edit properties after note creation but it's not so criminal.

YukiGasai commented 11 months ago

I updated the plugin. Please give it a try ^^

panter-dsd commented 11 months ago

Yep, it does work! Thank you @YukiGasai!!!