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

Weird behavior when two issues have the same name #30

Open
yoyozbi opened this issue Nov 3, 2024 · 1 comment
Open

Weird behavior when two issues have the same name #30

yoyozbi opened this issue Nov 3, 2024 · 1 comment

Comments

@yoyozbi
Copy link

yoyozbi commented Nov 3, 2024

Question Answer
Obsidian version v1.7.4
Plugin version 0.1.10
Operating System NixOS 24.05

Describe the bug
I have a repository where I have multiple issues with the same name. I know it could seem weird to do that, but I separate them using tags. When doing so, only the first issue file is created

To Reproduce
Create two issues with the same title.

Expected behavior
Without changing the current default behavior, you could add a way to specify a template for filenames. Or change the current behavior to have a prefix with the issue ID in the filename

Additional context
Feel free to ask me if you don't have time, I could try to do it.

@benr77
Copy link
Owner

benr77 commented Nov 3, 2024

Yes, this will be the case because the plugin writes a file for each issue, and the filename is derived from the issue title.

I prefer your solution of using the issue ID as a prefix. However, this would be a BC break so I guess we'd need to make this configurable and ensure the default behaviour remains unchanged (i.e. not using the ID as a prefix).

Adding a config setting for a "filename template", which is a string that is parsed to substitute variables such as "id", "title" etc. Then the default setting for "filename template" could be just {slug}.md but you would have the option to change this to {id}-{slug}.md etc.

I have very little time available at the moment, and this is definitely more of an edge case, so doubt I will work on it, but a PR from you or anybody else is more than welcome. If you do submit a PR please ensure it has some test cases included as the project is lacking test coverage. Thanks.

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

No branches or pull requests

2 participants