Repository navigation
Replies: 1 comment
|
Thanks, team is looking into this |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Assessment()/RiskAssessment() hardcode
sys_domain: 'global'— no way to author a survey/assessment in a non-global domainEnvironment:
@servicenow/sdk4.13.3, domain-separated instance. Building a survey (asmt_metric_type+asmt_metric_category+asmt_metric+asmt_metric_definition) that must land in a specific business domain, notglobal.Related to #79 and #91 — this is the plugin-specific root cause for the Assessment family.
Problem
Assessment()has no domain property, and$override: { sys_domain }is silently dropped:Every generated record ends up with
<sys_domain>global</sys_domain>regardless.Root cause (traced in the build plugins)
Assessment/RiskAssessmentset the domain as a constant, so$overridecollides with an already-set field:assessment/assessment-plugin.ts—sys_domain: $.val('global')on the type record.assessment/assessment-utils.ts— same constant on the nested category, metric, and definition records.assessment/risk-assessment-plugin.ts— same pattern.$.val('global')never consults the source. Other plugins read it from the source instead:list-plugin.tsuses$.from('sys_domain').def('global'),form-plugin.ts(toFile) writes the record's actual value, andsla-plugin.tsdoesn't setsys_domainat all (so$overrideapplies there).$overrideitself isn't the blocker: insdk-build-core/.../plugins/override.tsthe blocklist is onlysys_id,sys_scope,sys_update_name,sys_domainpath—sys_domainis explicitly allowed. It's dropped only because the Assessment plugin already set the field.Request
More broadly than just Assessment: domain separation should work consistently across all the typed Fluent APIs. Today it's inconsistent — some plugins read
sys_domainfrom the source (List,Form), some ignore it (Slaleaves it unset), andAssessment/RiskAssessmenthardcode'global'. The result is that authoring a record into a non-global domain works for some APIs and is impossible for others.Could domain separation be supported uniformly — either via a first-class domain property on the typed APIs, or by consistently honoring
sys_domain/$overrideacross every plugin (starting withAssessment/RiskAssessment, which hardcode it)?All reactions