<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Create Scrum Task - Analysis Task - Business Rule with Script not working in CMDB forum</title>
    <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3120275#M13665</link>
    <description>&lt;P&gt;Hey Jennifer,&lt;/P&gt;&lt;P&gt;I fixed it in the end with code but I had to change the view to see the output. Is there any code to add that I can apply where I will see the output in default view?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2024 09:24:35 GMT</pubDate>
    <dc:creator>Philip Owen</dc:creator>
    <dc:date>2024-12-05T09:24:35Z</dc:date>
    <item>
      <title>Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119476#M13658</link>
      <description>&lt;P&gt;Why is this script with a Business Rule not working?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scenario is that I want to create Tasks from when a story is created to prevent them manually being created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; executeRule(current, previous &lt;/SPAN&gt;&lt;SPAN&gt;/*null when async*/&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Add your code here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; gr = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'sn_safe_scrum_task'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gr.&lt;/SPAN&gt;&lt;SPAN&gt;Initialize&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gr.type = &lt;/SPAN&gt;&lt;SPAN&gt;'1'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gr.short_description = &lt;/SPAN&gt;&lt;SPAN&gt;"Analysis Task"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gr.parent = current.sys_id;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gr.insert();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;})(current, previous);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;the ge.type Discionary Entry is correct being = 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This is to be 'inserted' 'After' so why is the task not appearing? I have the correct table as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Dec 2024 12:26:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119476#M13658</guid>
      <dc:creator>Philip Owen</dc:creator>
      <dc:date>2024-12-04T12:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119522#M13659</link>
      <description>&lt;P&gt;If you are not seeing the resultant scrum_task record, first add a gs.info log line to the beginning of the function to confirm the BR is triggering and the script is actually running.&amp;nbsp; Once you have confirmed this, check the system log when this is attempted to see if there are any errors trying to insert the record.&amp;nbsp; Otherwise, there could be another Business Rule or Data Policy that is preventing the insert without an error if a mandatory field is not populated.&amp;nbsp; You could try a similar script with a hard-coded parent sys_id in a Fix Script to take the BR trigger and scope out of the equation.&amp;nbsp; Do you have any Filter Conditions or Condition on the script tab?&amp;nbsp; Is the Business Rule in the same scope as the table it's running on?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 13:36:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119522#M13659</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2024-12-04T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119553#M13660</link>
      <description>&lt;P&gt;&amp;nbsp;Thanks Brad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No there are no conditions, from what I have been learning and I am fairly new to scripting but am understanding it the more I do so the way I am reading my code it should present me with an Analysis Task once I have created a Story.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to add a loop that will add the additional tasks but wanted to the see the tangible result in my own instance before adding that loop, which I am not seeing yet.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 14:19:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119553#M13660</guid>
      <dc:creator>Philip Owen</dc:creator>
      <dc:date>2024-12-04T14:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119598#M13661</link>
      <description>&lt;P&gt;I've fixed the issue using a SCUM view but how to you get the tasks appearing in Default View what most people will be using?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, this is the loop that I am using which does not seem to be working any view. Any suggestions anyone?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; executeRule(current, previous &lt;/SPAN&gt;&lt;SPAN&gt;/*null when async*/&lt;/SPAN&gt;&lt;SPAN&gt; ) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Add your code here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (i = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;; i &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;; i++) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; type = i.toString();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; gr = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;GlideRecord&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'sn_safe_scrum_task'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.initialize();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.type = type;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.short_description = &lt;/SPAN&gt;&lt;SPAN&gt;"Scrum Task "&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;Type&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.parent = current.sys_id;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.insert();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;})(current, previous);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 14:49:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119598#M13661</guid>
      <dc:creator>Philip Owen</dc:creator>
      <dc:date>2024-12-04T14:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119606#M13662</link>
      <description>&lt;P&gt;So you are saying the task is being created, but you just didn't have the related list added?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the hamburger menu, click Configure -&amp;gt; Related Lists. Make sure the view shows "Default" and add your related list wherever you want it to appear. Click Save to save your changes.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 14:51:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3119606#M13662</guid>
      <dc:creator>JenniferRah</dc:creator>
      <dc:date>2024-12-04T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3120275#M13665</link>
      <description>&lt;P&gt;Hey Jennifer,&lt;/P&gt;&lt;P&gt;I fixed it in the end with code but I had to change the view to see the output. Is there any code to add that I can apply where I will see the output in default view?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 09:24:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3120275#M13665</guid>
      <dc:creator>Philip Owen</dc:creator>
      <dc:date>2024-12-05T09:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3120467#M13676</link>
      <description>&lt;P&gt;If you want to see the related list of tasks in the default view, do the steps I outlined above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Open the record where you want to add the related list. From the hamburger menu, click Configure -&amp;gt; Related Lists. Make sure the view shows "Default" and add your related list wherever you want it to appear. Click Save to save your changes.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:07:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3120467#M13676</guid>
      <dc:creator>JenniferRah</dc:creator>
      <dc:date>2024-12-05T13:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create Scrum Task - Analysis Task - Business Rule with Script not working</title>
      <link>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3122351#M13697</link>
      <description>&lt;P&gt;Yep go that thank you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2024 12:20:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/cmdb-forum/create-scrum-task-analysis-task-business-rule-with-script-not/m-p/3122351#M13697</guid>
      <dc:creator>Philip Owen</dc:creator>
      <dc:date>2024-12-08T12:20:38Z</dc:date>
    </item>
  </channel>
</rss>

