In SDL Web, users fail to demote a folder that gives an error "the demoted item cannot be published in publications where it will be demoted from"
000005467|11/10/2017 10:03 PM
SDL Web 8.1.1, SDL Web 8.5
Demoting the folder gives error "the demoted item cannot be published in publications where it will be demoted from", despite the fact that folder is not published.
Hotfix CM_188.8.131.5263 has fixed the logic of the EDA_SYSTEM_GETBLUEPRINT_ORG_ITEM store procedure so as the published statuses of the items are returned correctly.
As a side note, depending on where you run this statement, you might run into a syntax error around line 70. The problem is that this line ITM.FILE_NAME, needs to be ITM.[FILE_NAME], it is because FILE_NAME is a SQL function in some version of SQL Server Management Studio.
There was an issue in the logic of the EDA_SYSTEM_GETBLUEPRINT_ORG_ITEM store procedure. It could return an invalid publish state for some items as item type of the item was not taken into account.