Skip to content

Adds error notification, prevent unneeded changes#60

Merged
chhoumann merged 1 commit intochhoumann:masterfrom
ryanjamurphy:45-prevent-kanban-helper-from-changing-all-files
Feb 9, 2022
Merged

Adds error notification, prevent unneeded changes#60
chhoumann merged 1 commit intochhoumann:masterfrom
ryanjamurphy:45-prevent-kanban-helper-from-changing-all-files

Conversation

@ryanjamurphy
Copy link
Copy Markdown

This PR does two things:

  1. Re: issue Kanban helper function throws error #45, this PR adds a user-facing notification to help users see which files are missing the YAML metadata property Kanban Helper is looking for.

  2. Previously, if Kanban Helper was operating on a board, when a user changed a card, Kanban Helper would rewrite the metadata of every card on the board, even if there was no change to a linked file's metadata. This led to every file e.g., getting a new date modified on the file system. I've added a check, const propertyHasChanged = (targetProperty.content != heading);, which returns true if the linked file's metadata property has a value that is different from the one the user has changed it to. Kanban helper will therefore only run updatePropertyInFile if propertyHasChanged is true.

Thanks for a fantastic plugin!

@chhoumann
Copy link
Copy Markdown
Owner

PR looks great, thank you very much @ryanjamurphy!

@chhoumann chhoumann merged commit 74badca into chhoumann:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants