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

Allow multiple deletion of jobs #1128

Merged
merged 8 commits into from
Mar 3, 2021
Merged

Allow multiple deletion of jobs #1128

merged 8 commits into from
Mar 3, 2021

Conversation

crawr
Copy link
Contributor

@crawr crawr commented Jan 11, 2021

Signed-off-by: Richelle Anne Craw richelleanne.craw@broadcom.com

Proposed changes

Fixes #224

This PR enables the canSelectMany option in the Jobs Provider vscode.window.createTreeView. This option allows users to select multiple job nodes using Shift+Click.

The new deleteMulti function accepts the VSCode tree container and then loops through the valid job nodes selected in the tree, passing them one at a time to the existing delete job function.

Release Notes

Milestone: v1.13 (?)

Changelog: Added the ability to select multiple jobs and then delete them at once.

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

This PR is open for discussion. A thread is open here: #1130

crawr and others added 4 commits January 10, 2021 15:50
Signed-off-by: Richelle Anne Craw <richelleanne.craw@broadcom.com>
Signed-off-by: Richelle Anne Craw <richelleanne.craw@broadcom.com>
@crawr crawr added this to the 1.13 Release milestone Feb 16, 2021
@crawr crawr marked this pull request as ready for review February 16, 2021 10:56
Copy link
Contributor

@katelynienaber katelynienaber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @crawr :) I am getting one error with multiple delete, which doesn't occur when I delete jobs one at a time:
image

The jobs are successfully deleted though.

@jellypuno
Copy link
Contributor

@crawr I'm testing this PR and I didn't experience the error that @katelynienaber mentioned here. The one thing that I notice is that DELETE is mentioned twice in the context menu.

ZEDeleteMulti

@jellypuno jellypuno self-requested a review February 26, 2021 11:47
jellypuno
jellypuno previously approved these changes Feb 26, 2021
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@crawr
Copy link
Contributor Author

crawr commented Feb 26, 2021

@crawr I'm testing this PR and I didn't experience the error that @katelynienaber mentioned here. The one thing that I notice is that DELETE is mentioned twice in the context menu.

@jellypuno Thanks for testing. The other Delete in the context menu refers to the key binding/keyboard shortcut for that Delete Job action

@JillieBeanSim JillieBeanSim self-requested a review March 2, 2021 21:47
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crawr I did see the same error pop up as @katelynienaber and it pops up the same number of times as jobs included in the multi-delete. Also the tree collapses on me after the delete goes through. Is the collapsing of the tree expected? I would not expect it to collapse.

localize("deleteJob.delete", " deleted")
);
this.removeFavorite(this.createJobsFavorite(node));
await this.removeFavorite(this.createJobsFavorite(node));
Copy link
Contributor

@JillieBeanSim JillieBeanSim Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crawr I am wondering if the children error is popping up due to it not being in favorites as I reran again and saving 2 of my 3 jobs into favorites then deleted all 3 and error only popped up once. Before I just deleted 3 jobs and none were in favorites and the pop up occurred 3 times.

Copy link
Contributor

@JillieBeanSim JillieBeanSim Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does call children, if you change this:
image
to this:
image
the pop up error disappears

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @JillieBeanSim I added the checking and I hope it will fix the issue. I did have the jobs in favorites so I did not encounter it previously.

Signed-off-by: Richelle Anne Craw <richelleanne.craw@broadcom.com>
@jellypuno jellypuno dismissed katelynienaber’s stale review March 3, 2021 17:19

New changes are added. please review

@JillieBeanSim JillieBeanSim self-requested a review March 3, 2021 19:08
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the pop up issue @crawr and the folder collapsing may be related to a refresh story we have so not worried about that.

This LGTM all expected checks and tests are passing. Thanks for putting this work together and now I am excited to also see this multi-delete option in the Data Sets & USS trees winkwink

@jellypuno jellypuno self-requested a review March 3, 2021 19:47
@jellypuno jellypuno merged commit 2202efa into master Mar 3, 2021
@jellypuno jellypuno deleted the job-multi-select branch March 3, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow mass deletion of jobs
4 participants