You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function itself does not work (special edge case!)
Part 1
When I use the keybinding ctrl+alt+r to run the command zowe.openRecentMember, nothing happens.
However, the keybinding (ctrl+alt+p) does work for its cousin, the command zowe.searchInAllLoadedItems, despite their entries in package.json being identical.
For the benefit of the doubt, I temporarily switched the zowe.searchInAllLoadedItems command to run the openRecentMemberPrompt function, and when pressing that keybind (ctrl+alt+p), it opened fine.
Perhaps some kind of key conflict? These are my keys:
Part 2
Once I got the function running using that temporary switch as above, the menu would appear with all the files in my history as expected, however, when selecting a file, I always get the warning message Cannot read properties of undefined (reading 'pattern').
I debugged the issue and found that the sessionNode was not being found in my profile, which dropped through the code as null and eventually lead to this warning. sessionNode is not being found in my profile because my profile name is now simply different to how it is in the file history, which is where the recent files quick pick gets its items from.
Much easier to show a screenshot, so here, you can see that my current profile name is zosmf_zxplore, while the profile name that is being expected, is zxplore.
However, you may notice, that in the above screenshot, the USS file in history and my USS profile name is the same. So why is it still not working then?
The file history stores the profile name in all caps, while my profile name is in all lower, so it is checking all caps profile name with all lower one and does not find a match, so sessionNode is also not being found. Notice that this is not an issue for a matching dataset profile though, because it does actually do the lower case conversion for both first!
For part 1: The open recent members prompt to appear.
For part 2: Proper handling of finding the sessionNode.
Screenshots
Desktop (please complete the following information):
OS: Win10
Zowe Explorer Version: v3.1.0
(Optional) Zowe CLI Version:
(Optional) Are you using Secure Credential Store?
Additional context
Not sure how to fix part 1, but part 2 should be straight forward plus a few test cases too.
For a bit of fun, I found the PR that originally added this function, it is virtually untouched except for someone who must've added that cases handling to the dataset part but not the uss part 😄
The text was updated successfully, but these errors were encountered:
Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.
Describe the bug
There are two parts to this bug:
Part 1
When I use the keybinding ctrl+alt+r to run the command
zowe.openRecentMember
, nothing happens.However, the keybinding (ctrl+alt+p) does work for its cousin, the command
zowe.searchInAllLoadedItems
, despite their entries in package.json being identical.For the benefit of the doubt, I temporarily switched the zowe.searchInAllLoadedItems command to run the openRecentMemberPrompt function, and when pressing that keybind (ctrl+alt+p), it opened fine.
Perhaps some kind of key conflict? These are my keys:
Part 2
Once I got the function running using that temporary switch as above, the menu would appear with all the files in my history as expected, however, when selecting a file, I always get the warning message
Cannot read properties of undefined (reading 'pattern')
.I debugged the issue and found that the
sessionNode
was not being found in my profile, which dropped through the code as null and eventually lead to this warning.sessionNode
is not being found in my profile because my profile name is now simply different to how it is in the file history, which is where the recent files quick pick gets its items from.Much easier to show a screenshot, so here, you can see that my current profile name is
zosmf_zxplore
, while the profile name that is being expected, iszxplore
.However, you may notice, that in the above screenshot, the USS file in history and my USS profile name is the same. So why is it still not working then?
Because of a seperate oversight in the code:
zowe-explorer-vscode/packages/zowe-explorer/src/trees/shared/SharedActions.ts
Line 190 in eeeaf84
The file history stores the profile name in all caps, while my profile name is in all lower, so it is checking all caps profile name with all lower one and does not find a match, so
sessionNode
is also not being found. Notice that this is not an issue for a matching dataset profile though, because it does actually do the lower case conversion for both first!https://github.com/zowe/zowe-explorer-vscode/blame/eeeaf84a62a0a83b076b49e6bc7a1eb5ed9f0abc/packages/zowe-explorer/src/trees/shared/SharedActions.ts#L195
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For part 1: The open recent members prompt to appear.
For part 2: Proper handling of finding the
sessionNode
.Screenshots
Desktop (please complete the following information):
Additional context
Not sure how to fix part 1, but part 2 should be straight forward plus a few test cases too.
For a bit of fun, I found the PR that originally added this function, it is virtually untouched except for someone who must've added that cases handling to the dataset part but not the uss part 😄
The text was updated successfully, but these errors were encountered: