marc0l92 / obsidian-jira-issue

This plugin allows you to track the progress of Atlassian Jira issues from your Obsidian notes.
https://marc0l92.github.io/obsidian-jira-issue/
GNU Affero General Public License v3.0
234 stars 36 forks source link

JIRA note match problem #13

Closed Rick1125 closed 2 years ago

Rick1125 commented 2 years ago

issue description

  1. create a jira-search block with notes column
  2. click on one of notes column "+" sign
  3. when jira issue keys are duplicated in shortest length, it will match wrong notes example: there are 20 issues in search results, PR-1, PR-2 .... PR-20. if I click on PR-11 and created a note, then PR-1 also shows that PR-11, and same happens on PR-1X(maybe PR-1XX, I didn't test), PR-1 will show all the notes start with PR-1
Rick1125 commented 2 years ago

Here is the fix: src/rendering/renderTableColumns.ts 224 const connectedNotes = markdownNotes.filter(n => n.basename === issue.key)

hope it works.

marc0l92 commented 2 years ago

Thanks for reporting this issue. I implemented the filter using startWith function because I wanted to give more freedom to the notes title. Examle: In case of issue PR-20 I want to allow people to create notes called: PR-20 Fix bug on search service.

But the issue you raised is completely valid. I will modify the filter in order to match notes that starts with the issue key not followed by another number.

marc0l92 commented 2 years ago

Please update the plugin to version 1.19.0 and let me know if the issue is fixed

Rick1125 commented 2 years ago

yes, it works. thanks!