condition on mobile UI Action failing to evaluate


The reject button on the mobile interface is always present despite failing it conditions:

current.state == 'requested' && gs.hasRole('approval_admin') || isApprovalMine(current)

Steps to Reproduce


  1. Impersonate a user with approval rights. 
  2. Access the mobile UI ($
  3. Go to My approvals in the navigation menu.
  4. Select a record in Requested state and click the Approve UI action.

Expected Result:  After the approval, the Reject UI action should no longer be available. 

Actual Result: The Reject UI action is still available, and the record can be rejected. Note that the approval button is not available once the state of the record is no longer current.state == 'requested'.


The initial condition was as follows:

current.state == 'requested' && gs.hasRole('approval_admin') || isApprovalMine(current)

Changing the code to the following will cause the UI action to become hidden as expected:

current.state == 'requested' && (gs.hasRole('approval_admin') || isApprovalMine(current))

Related Problem: PRB627678