Notifications

491 views

Description

Cancel Request button is not visible on the Order Status screen if a special condition is provided.

 

Steps to Reproduce

  1. Go to sys_properties_list.do and set the following property values:

    glide.sc.checkout.cancel: true
    glide.sc.checkout.cancel.condition: Value {current.opened_by == gs.getUserID() || current.caller_id == gs.getUserID() || current.requested_for == gs.getUserID() || }

  2. Enable the Cancel request option on the Cart Layout Order Status.

    For more information, see the product documentation topic Configure cart layout.

  3. Impersonate the System Administrator.

  4. Navigate to any order guide.

  5. Enable the two-step checkout.

    For more information, see the product documentation topic Enable the two-step checkout process.

  6. Enable Use Cart Layout on the order guide.

  7. Click Try It.

  8. Fill in all required information and check out.

    Note that in the final Order Status, the Cancel Request button is not visible even though the value of the glide.sc.checkout.cancel.condition sets the user System Administrator as an active user.

  

Workaround

This is expected behaviour, due to the increased instance security, as the condition passed needs to be validated as safe condition:

 

  1. Navigate to Service Catalog > Catalog Definition > Maintain Cart Layouts.

  2. Click Order Status Screen.

  3. In the Widget Macros related list, click sc_order_status_view_buttons.

  4. Copy the content from the macro.

  5. Navigate to System UI > UI Macros and click New.

  6. Create a macro with the following values:

    Name: sc_order_status_view_buttons_safe
    Paste the copied content.

  7. In Line 26, replace the following code

    <g2:evaluate var="jvar_condition_eval" expression="$[jvar_condition]" />
    with
    <g2:evaluate var="jvar_condition_eval" expression="$[SAFE:jvar_condition]" />

  8. Navigate to Service Catalog > Catalog Definition > Maintain Cart Layouts.

  9. In the Widget Macros related list, replace "sc_order_status_view_buttons" with "sc_order_status_view_buttons_safe".

    The final two steps guarantee that the condition mentioned in glide.sc.checkout.cancel.condition is safe to use.

 


Related Problem: PRB1103740

Seen In

Jakarta

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-01-30 21:09:21
Published:2018-01-16