stories cannot be moved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:01 AM
Hi,
i have this requirement: storiescannot be moved from Ready for testing into Testing or Complete state if a Code Review Task(scrumtask) is still open.
i created this script besides the fact that i need to check for the correct state values, can annyone tell me if this script should work:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:06 AM - edited 07-28-2023 04:07 AM
Hi there,
"can annyone tell me if this script should work"
You can test that right. What is your real question, what is the issue you are really facing? Or is it like you copied the script and have limited scripting knowledge and asking therefor?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 05:01 AM
mark,
you are completly right, im trying to learn and get better.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:09 AM
Just looking at the script, already this looks odd to me:
current.rm_story === "story"
Can you verify the rm_story field. Is that indeed on your table and if so what type is it. I wouldn't expect to see such a field here or at least not as a string value.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 04:12 AM
Looking at:
if (current.rm_story === "story" && current.state === -7) {
Can that also be moved to the condition field of the business rule? Using the Filter Conditions or Condition is a best practice, and when using the Filter Conditions you also don't need any scripting knowledge.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field