Digital product release workspace policies(record reference)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi All,
Have anyone used policies with the option record reference. I m trying to figure it out but not getting much info on this. my requirement is if all the stories deployment stage is test then the policy result should get complaint. so i have created the record reference but still it is not working.. what all options i can use in the policy for this logic.
Note: Deployment stage is the custom field in story table
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I have used another "all_planned_stories_complated" there i have done changes in the code ..but that is also not working
(function(inputs, outputs) {
var releaseVersion = inputs.release_version;
outputs.no_stories_found = true;
outputs.sbx_percentage = 0;
if (!releaseVersion) {
return;
}
var storiesList = new sn_dpr.ReleaseCommonAccessUtil().getStoriesOfaVersion(releaseVersion);
if (!storiesList || storiesList.length === 0) {
return;
}
outputs.no_stories_found = false;
var totalCount = 0;
var sbxCount = 0;
var gr = new GlideRecord('sn_devops_work_item');
gr.addQuery('sys_id', 'IN', storiesList);
gr.query();
while (gr.next()) {
var stage = gr.getValue('u_deployment_stage'); // replace with your actual field
totalCount++;
if (stage == 'sbx') {
sbxCount++;
}
}
if (totalCount > 0) {
outputs.sbx_percentage = (sbxCount / totalCount) * 100;
}
})(inputs, outputs);