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

Sorting of PDS members by date created #2707

Merged
merged 8 commits into from
Feb 15, 2024

Conversation

SanthoshiBoyina
Copy link
Contributor

Proposed changes

To add an additional PDS member sorting option that allows users to sort by Date Created.

Release Notes

Milestone:

Changelog:

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

Signed-off-by: Santhoshi Boyina <Santhoshi.Boyina1@ibm.com>
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ef82a0e) 93.26% compared to head (7bba6e0) 93.24%.

Files Patch % Lines
...kages/zowe-explorer/src/dataset/ZoweDatasetNode.ts 92.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2707      +/-   ##
==========================================
- Coverage   93.26%   93.24%   -0.02%     
==========================================
  Files         102      102              
  Lines       10544    10562      +18     
  Branches     2260     2286      +26     
==========================================
+ Hits         9834     9849      +15     
- Misses        709      712       +3     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Santhoshi Boyina <Santhoshi.Boyina1@ibm.com>
JillieBeanSim
JillieBeanSim previously approved these changes Feb 8, 2024
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.

LGTM, did leave a comment regarding clean code if we want to go that route but good approving in it's state. Thanks @SanthoshiBoyina for the new Functionality.

@@ -326,7 +328,30 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod
return sortByName(a, b);
}

if (sort.method === DatasetSortOpts.LastModified) {
if (sort.method === DatasetSortOpts.DateCreated) {
Copy link
Contributor

Choose a reason for hiding this comment

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

with the list growing for ways of sorting should we consider a switch/case in place of the continued if/else if's?

@JillieBeanSim JillieBeanSim added this to the v2.15.0 milestone Feb 8, 2024
Signed-off-by: Santhoshi Boyina <Santhoshi.Boyina1@ibm.com>
@JillieBeanSim JillieBeanSim self-requested a review February 13, 2024 15:32
JillieBeanSim
JillieBeanSim previously approved these changes Feb 13, 2024
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.

LGTM! thanks @SanthoshiBoyina

adam-wolfe
adam-wolfe previously approved these changes Feb 13, 2024
Copy link
Contributor

@adam-wolfe adam-wolfe left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @SanthoshiBoyina

Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @SanthoshiBoyina - I left a comment regarding the changelog entry and had a small question about handling the "created date" (c4date) property.

packages/zowe-explorer/CHANGELOG.md Outdated Show resolved Hide resolved
packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts Outdated Show resolved Hide resolved
zFernand0 and others added 2 commits February 13, 2024 15:48
Signed-off-by: Santhoshi Boyina <Santhoshi.Boyina1@ibm.com>
@traeok traeok self-requested a review February 14, 2024 18:04
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the enhancement and for addressing my feedback @SanthoshiBoyina 🙂

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
16.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋
I'm curious what should we do about the member that don't have a c4date and/or m4date. Right now we fallback to sorting by name (which makes sense). The interesting part was that we use the same sort direction (descending). 🤔
I'm not suggesting we change it, it just surprised me to see a bunch of them without dates 😋

image

@zFernand0 zFernand0 merged commit a32320b into zowe:main Feb 15, 2024
28 of 30 checks passed
@JillieBeanSim
Copy link
Contributor

@SanthoshiBoyina make sure these changes are ported to the next branch, 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

Successfully merging this pull request may close these issues.

6 participants