-
Notifications
You must be signed in to change notification settings - Fork 745
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
DNN-31366 - Deleted page can still be selected as parent page #2925
DNN-31366 - Deleted page can still be selected as parent page #2925
Conversation
Dear approvers, any news on this PR? |
We are in the middle of the RC process. As soon as the next RC drops we will process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @dnnsoftware/tag can I get a second approval on this, and merge it ASAP
CI seems broken (it got a Powershell script error after merging the latest 9.4.x branch) and I don't seem to have the permission to run the build again. Can someone trigger the build please? Btw, I saw some similar failure reasons in some other builds so that there might be an issue with it.. |
@berkarslan-xo We are working on some issues with the build. For now I'll trigger a re-build which will at least build clean. /azp run |
Thanks, the build seems to be not retriggered yet as far as I can see though. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Commenter does not have sufficient privileges for PR 2925 in repo dnnsoftware/Dnn.Platform |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
|
||
// HasChildren should be true in case there is at least one not deleted child | ||
tab.HasChildren &= | ||
includeDeletedChildren || ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if GetTabsByParent(tab.TabID, tab.PortalID)
returns empty list, shouldn't tab.HasChildren
be false at that time? I mean like in the following:
tab.HasChildren &= (
includeDeletedChildren && GetTabsByParent(tab.TabID, tab.PortalID).Any()
) || (
!includeDeletedChildren && GetTabsByParent(tab.TabID, tab.PortalID).Any(a => !a.IsDeleted));
or more cleanly:
GetTabsByParent(tab.TabID, tab.PortalID).Any(a => includeDeletedChildren || !a.IsDeleted));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If GetTabsByParent
is empty, I would expect that tab.HasChildren
is already false
, so the rest of the conditions aren't considered. I believe it is fine as it is, but thanks for the review and double check 👍
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
0a098fb
to
2c00b6e
Compare
Hi @valadas , could you give the second approval, please (approvals got reset since a small commit is made)? |
* Fix error running unit tests (#2940) When running tests, the following error occurs: VSTest: Could not locate executable. cake-build/cake#1522 (comment) indicates that there's an issue using VS 2019, and presents a workaround to find the correct path * DNN-31366 - Deleted page can still be selected as parent page (#2925) * DNN-31366 - TabController HasChildren returns false if all children are deleted * Simplify HasChildren condition
* Fix error running unit tests (#2940) When running tests, the following error occurs: VSTest: Could not locate executable. cake-build/cake#1522 (comment) indicates that there's an issue using VS 2019, and presents a workaround to find the correct path * DNN-31366 - Deleted page can still be selected as parent page (#2925) * DNN-31366 - TabController HasChildren returns false if all children are deleted * Simplify HasChildren condition * deleting_themes_from_Extensions_doesnt_remove_it_from_themes (#2950) * Returns the working types if some fail (#2953)
…e#2964) * Fix error running unit tests (dnnsoftware#2940) When running tests, the following error occurs: VSTest: Could not locate executable. cake-build/cake#1522 (comment) indicates that there's an issue using VS 2019, and presents a workaround to find the correct path * DNN-31366 - Deleted page can still be selected as parent page (dnnsoftware#2925) * DNN-31366 - TabController HasChildren returns false if all children are deleted * Simplify HasChildren condition * deleting_themes_from_Extensions_doesnt_remove_it_from_themes (dnnsoftware#2950) * Returns the working types if some fail (dnnsoftware#2953)
Partially Fixes #2919 (There are total 2 PRs; for the other PR, you can check: dnnsoftware/Dnn.AdminExperience#1099 ).
Summary
A new overload which accepts an additional parameter named as "includeDeletedChildren" is added. (retargeted to "9.4.x" branch, you can reach the previous PR which was targeted to "development" branch from here: #2920 )
Demo: https://drive.google.com/open?id=1yg6OuVuLMbwCbBlFHXDqQa8Abd3WPIn_
Note: This PR should be merged BEFORE dnnsoftware/Dnn.AdminExperience#1099