Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Jon G Lind
ServiceNow Employee

A Playbook that is not in the ReleaseOps scope will not execute

There is currently a bug in the business rule that fires playbooks for ReleaseOps in which it does not properly account for scope.  

 

Here's how to fix it

  1. Select the scope ReleaseOps with the globe in the header.
  2. Go to System Definition > Business Rules
  3. Find the Playbooks: "Run Release Playbook on Preparing" and "Run Assessment Playbook when Ready"
  4. Change the script: Find the "triggerPlaybook" line near the end and replace it: 
    // Find the following line near the end:
    // Run Assessment Playbook when Ready (approximately line 46)
    // Run Release Playbook on Preparing (approximately line 20)
    /* sn_playbook.PlaybookExperience.triggerPlaybook(grPlaybook.name, current); */
    // And REPLACE it with:
    
    const scopeName = grPlaybook.sys_scope.scope;
    // Don't include scope name if calling to another ReleaseOps playbook
    const playbookName = (scopeName == 'sn_releaseops' ? '' : scopeName + '.') + grPlaybook.name;
    sn_playbook.PlaybookExperience.triggerPlaybook(playbookName, current);
2 Comments