Description
Steps to Reproduce
-
Navigate to Item Designer > Create New.
-
Assign the following values:
- Name: TestItemDesigner
- Catalogs: Service Catalog
- Categories: Services
- Description: Test Item Designer
-
Click Next.
-
Under Related Links, click Add a Task.
-
Assign the following values:
- Assignment: Predefined
- Assign to: Local database team for the requestor
- Short description: Test Item Designer Task
-
Click Submit.
-
Right-click in the header and choose Personalize > Form Layout from the context menu.
-
Use the slushbucket to add Activities (filtered) to the Selected list.
-
Click Save.
The item information shows a State of Draft.
-
Click the Publish button.
Note that the State field shows Published. The Activity field, however, still shows State: Draft. Also, if you right-click and choose History > List from the context menu, the audit history does not show a change in State from Draft to Published.
-
Click the Unpublish button.
Note that the State is now Draft and the Activity field shows Draft was Published. The History > List audit record shows the State change from Published to Draft.
Workaround
-
Comment the following two lines in the publish function of the script include sc_ic_Item:
this._enableQuietUpdate(); <line num : 248>
this._disableQuietUpdate(); <line num : 252> -
Add the following lines in the business rule "set draft if changed" defined in the sc_ic_item_staging table.
Change the following lines:
sc_ic_Factory.wrap(current).setDraft();
sc_ic_Factory.wrap(current).displayDraftMessage(previous.state);
to:
if (!(prev.state == sc_ic.DRAFT && current.state == sc_ic.PUBLISH)) {
sc_ic_Factory.wrap(current).setDraft();
sc_ic_Factory.wrap(current).displayDraftMessage(previous.state);
}Note: The line numbers might not be exactly the same.
Related Problem: PRB677219