1620 views

Description

Since Geneva UI16, the editor bar and large text box remain even when the variable is read-only. This is different than other versions, where the editor bar is hidden and the box is made smaller to only fit the text that is needed.

Steps to Reproduce

  1. Create a new catalog item.
  2. Create a variable for the catalog item:
    • Type: HTML
    • Question: HTML Box
    • Name: my_html
    • Default Value: Sample Text Here
  3. Create a Catalog UI policy:
    • Applies to: A Catalog Item
    • Short Description: Hide HTML
    • Catalog Item: [Search for and select the item you created in step 1]
    • Catalog Conditions:
      Applies on a Catalog Item view | is | true
      [AND]
      Applies on Catalog Tasks | is | true
      [AND]

      Applies on Requested Items | is | true
    • Save the form.
  4. In this Catalog UI policy, scroll to the Related Links section and create a new Catalog UI Policy Action:
    • Variable Name: my_html
    • Read only: True
  5. Go through the Service Catalog and try ordering the item. 
    Note that on the cat_item_view page, the box is made smaller, and the HTML editor is not showing.
  6. Repeat steps 1-5 on a Geneva instance (or export/import the Catalog Item, Variable, UI Policy, and UI Policy Action records).
    Note that although the variable is read-only, you see a large text box and the HTML editor is displayed on the cat_item_view page.

Workaround

This behaviour is by design. There are two methods for making an HTML variable read-only in Service Catalog:

  1. Have HTML field read-only (the editor controls are still visible, but disabled).

    Use a UI Policy or Client Script on the html variable.





  2. Have HTML field read-only as a text area without editor control.

    Update the WRITE ROLES and CREATE ROLES on HTML variable with a role like nobody or admin.



Related Problem: PRB653425

Seen In

Eureka Patch 11 Hot Fix 2
Fuji Patch 10
Fuji Patch 12 Hot Fix 1
Fuji Patch 13 Hot Fix 1
Geneva
Geneva Patch 0 Hot Fix 1
Geneva Patch 1
Geneva Patch 3
Geneva Patch 3 Hot Fix 1
Geneva Patch 3 Hot Fix 2
Geneva Patch 4
Geneva Patch 5
Geneva Patch 6
Geneva Patch 8
Helsinki
Helsinki Patch 0 Hot Fix 1
Helsinki Patch 0 Hot Fix 3
Helsinki Patch 1
Helsinki Patch 2
Helsinki Patch 4
Helsinki Patch 5

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-04-10 09:40:56
Published:2018-04-10