Closed gforrest-bw closed 4 years ago
Reading through the source code I discovered the project key mapping setting, which I believe will patch over this problem if I set ui=UI
. However, assuming JIRA project keys can only be uppercase, I think it would be more elegant for the plugin to do this conversion automatically. I'm not confident that JIRA project keys can only be uppercase, but I've never seen one that isn't.
Hi, the plugin use this RegExp -> "branchName".match(/([A-Za-z0-9]+)-(\d+)/)
I will try to fix it. PR or help would be greatly appreciated. :+1:
The important part is that after it matches the issue ID, it capitalizes the project key before setting the active project.
I suppose that could happen on this line, maybe using a named function which "normalizes" the project key: https://github.com/gioboa/jira-plugin/blob/develop/src/services/git-integration.service.ts#L162
I might be able to make a PR sometime.
I will fix it. 👍
Here you can try an alpha version. Please have a try and give me feedback. :+1: If all it's ok, I will release a new official version. :smile: jira-plugin-0.19.1-alpha1.zip
I gave it a spin, and it seems to work - I didn't get any error messages, even after removing my ui=UI
alias in settings.
Thank you for your feedback :+1:
Describe the issue
I use lowercase characters for my branch names. Our JIRA project ID is "UI", but my branches generally use
ui
.When I utilize the feature to auto-select an issue based on branch name (which is very convenient!), the plugin tries to set my active project to
ui
, and it doesn't seem to work correctly, as evidenced by the error below.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the plugin to match the auto-detected project ID against the list of available IDs in a case-insensitive manner and choose the one which has the same exact characters, regardless of casing.
Screenshots
Desktop (please complete the following information):
Version: 1.42.1 (user setup) Commit: c47d83b293181d9be64f27ff093689e8e7aed054 Date: 2020-02-11T14:45:59.656Z Electron: 6.1.6 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Windows_NT x64 10.0.18362
Log