Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Diarium tracker values with a colon are imported incorrectly #79

Open
EvanFreyer opened this issue Jan 13, 2025 · 1 comment
Open
Assignees
Labels
bug Something isn't working needs testing This has been implemented and needs testing

Comments

@EvanFreyer
Copy link

Describe the bug

When importing a Diarium export that includes tracker values with a colon, they will be parsed incorrectly. Only the last part of the string will be saved as the value while everything before the colon will be imported as part of the tracker name.

For example: If you have a tracker called "Foo" and add a tracker value called "Foo: Bar" into an entry, it will appear as a property named "Foo: Foo" with the value "Bar" after importing it to Obsidian

To Reproduce

Steps to reproduce the behavior:

  1. Create a Diarium tracker called "Foo"
  2. Create a Diarium entry with a tracker value "Foo: Bar"
  3. Export the Diarium data and import in Obsidian
  4. Look into the imported entry and observe created property

Expected behavior

The property should be called "Foo" with a value "Foo: Bar"

Specs

  • Platform: Export on iOS 18, Import on macOS 14.7.2
  • Plugin version: 1.2.22

Additional context

I love your plugin! Thanks for creating it!

@EvanFreyer EvanFreyer added the bug Something isn't working label Jan 13, 2025
@Erallie Erallie added the in the works This issue is currently being worked on label Jan 14, 2025
@Erallie
Copy link
Owner

Erallie commented Jan 14, 2025

@EvanFreyer So this is actually more difficult, because the way that the tracker values are stored in the .json file that it exports is a single string for each tracker, with the tracker name and the tracker value only separated by a colon. So if you have a tracker named "Foo" and the tracker value named "Foo: Bar", it would look like, "Foo: Foo: Bar" in the .json that it exports. You would either need to choose to split the key and the value at the first colon or the last colon.

Given, I was able to make a setting in the import so that you can choose between the two options. Please try out the latest release, and let me know if it works!

@Erallie Erallie added needs testing This has been implemented and needs testing and removed in the works This issue is currently being worked on labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs testing This has been implemented and needs testing
Projects
None yet
Development

No branches or pull requests

2 participants