Pages

13 July, 2022

Sitecore XP - Content author cannot cancel or pick a winner in A/B Test created by another content author

In Sitecore XP, to cancel or pick a winner (variation) in A/B test, a content test owner who created the test or an administrator can do it. In case if there is an another non-admin content author (who is not the content test owner) who wants to pick a winner, content author should be part of a Sitecore role - sitecore\Analytics Advanced Testing.

In our project, we had a project specific Sitecore role called sitecore\Base Content Editor role. Then based on content author location, we have created Site specific roles (example: Site Role 1) inheriting the Base Content Editor.  


Base Content Editor role has content authoring specific Sitecore roles and also sitecore\Analytics Advanced Testing. Content authors are added to Site Roles. A content author user (User 1) created an A/B tested and started it. It ran for few weeks and another content author user (User 2) with the same access tried to pick a winner based on the test results but the button was greyed out. 


Observations:

  1. If we add Analytics Advanced Testing role to the second content author user directly and not as an inherited role, then pick a winner button was enabled and user was able to click the button. 

    It seems that hasRole processor in <canCancelTest> pipeline is checking only the top level role of the user and not the inherited roles. Ideally Sitecore should be checking the top level user roles and also the inherited roles. Sitecore Support has added this to their tracker (Reference number: 542108) and they will change the behavior of the hasRole processor.

  2. If we add the custom Site Roles to the <canCancelTest> pipeline -> HasRole processor, the second content author was able to click the pick a winner button. 

You can choose the option 2 if we have any site specific roles so that the second content authors can cancel or pick a winner of a test created by content author one. 

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }