Skip to content

Commit

Permalink
refactor(node/ds): improve recall/migrate readability
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Feb 24, 2025
1 parent 53c1630 commit a87ac8b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/zowe-explorer/src/trees/dataset/ZoweDatasetNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,13 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod
let dsNode = existingItems[item.dsname ?? item.member];
if (dsNode != null) {
elementChildren[dsNode.label.toString()] = dsNode;
if (SharedContext.isMigrated(dsNode) && item.migr?.toUpperCase() !== "YES") {
await dsNode.datasetRecalled(item.dsorg === "PO" || item.dsorg === "PO-E");
} else if (!SharedContext.isMigrated(dsNode) && item.migr?.toUpperCase() === "YES") {
dsNode.datasetMigrated();
if (item.migr) {
const migrationStatus = item.migr.toUpperCase();
if (SharedContext.isMigrated(dsNode) && migrationStatus !== "YES") {
await dsNode.datasetRecalled(item.dsorg === "PO" || item.dsorg === "PO-E");
} else if (!SharedContext.isMigrated(dsNode) && migrationStatus === "YES") {
dsNode.datasetMigrated();
}
}
} else if (item.migr && item.migr.toUpperCase() === "YES") {
// Creates a ZoweDatasetNode for a migrated dataset
Expand Down

0 comments on commit a87ac8b

Please sign in to comment.