234 views

Description

When publishing new or updated sections, there are Item Designer issues that cause unexpected results on the Catalog Item record.

Steps to Reproduce

  1. Create a new Item Designer record.
  2. In the Item Designer record, create a Question, Approval, and Task activity.
  3. Publish the Item Designer record.
    Note that the item is created and active on your [sc_cat_item] table.
  4. Navigate to the Item Designer and Add a Section to this item, labeling it Section Two.
    This should now set the Item Designer record back to Draft.
  5. Publish this Item Designer.
    You should see a message stating that the item was updated.
  6. Check the updated item record.
    Note that Section Two has not been created.
  7. In the same Item Designer record, Add a Question and add it to this new Section Two.
    As expected, this sets the item back to Draft.
  8. Publish this item again.
    This should create a new version of this item in the Catalog Items table.
  9. Open this new Item record.
    Note the new section and the new question you added.
  10. Go back to the Item Designer record.
  11. Modify the first Section record.
    For example, change the label from (empty) to Section One.
  12. Republish this item.
    Similar to what occurred in step 6, the updated Catalog Item record does not reflect any changes made to the section records.
  13. Go back to the Item Designer record.
  14. Add a third question record and link this to either section.
  15. Republish the item.
    Note that a new Catalog Item record is created. The updated section name and the new question are added. At this point, you should see two section labels (for example, Section One and Section Two), and three questions (1 associated with one section and the other two associated with the other section).
  16. Navigate back to the Item Designer record.
  17. Modify the third variable to switch sections.
    For example, if this was in Section One, put it in Section Two, or vice versa. Both sections should still have at least one question.
  18. Republish this item.
    Note that when you open the catalog item both section labels are missing, but the questions remain.

Workaround

The following script include files need to be modified to fix this issue.

Note: If you have customized the script includes, make sure you set replace on upgrade = true or handle your upgrades manually.

  1. Navigate to System Definition > Script Includes.
  2. Search for file named sc_ic_CatalogItem and modify the code in that file

  In the refreshQuestions function, change the following line of code:

  ioWrapper.createContainerStart(this._gr, n++, this._gr[sc_ic.SECTION].label);

  to:

  ioWrapper.createContainerStart(this._gr, n++, qGr[sc_ic.SECTION].label);     

          (approximately line 108)

  1. Search for file sc_ic_CatalogItemVariable and modify the code in that file.

    In the sc_ic_CatalogItemVariable.createContainerVar function, insert the following line of code:

  ioGr.initialize();

  Immediately after instantiating a glide record object for sc_.ITEM_OPTION table:

   var ioGr = new GlideRecord(sc_.ITEM_OPTION);>

   (approximately line 187) 

  1. Search for file named sc_ic_Item and modify the code in that file.

   In the >publish function, change the following line of code:

  if (this._gr[sc_ic.VAR_META_CHANGED]+"" == "true")

   to:

  if (this._gr[sc_ic.VAR_META_CHANGED]+"" == "true" || this._gr[sc_ic.LAYOUT_CHANGED]+"" == "true")

   (approximately line 217)

Note: If you modified the files earlier, the line numbers may be different.

 


Related Problem: PRB639869

Seen In

Eureka Patch 12
Fuji Patch 5

Fixed In

Helsinki

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-04-18 16:07:12
Published:2015-11-03