mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-06 10:10:52 +03:00
feat(form-compile): пустое значение фильтра "_" → self-closing <dcsset:right> (а не литеральный _)
Маркер пустого значения "_" (Get-FilterValue для пустого <dcsset:right xsi:type="X"/>) эмитился компилятором как литеральный `_` (<dcsset:right xsi:type="dcscor:Field">_</...>) в объектной форме фильтра (когда форсится valueType/userSettingPresentation). Платформа хранит self-closing пустой тег (напр. сравнение с незаданным полем dcscor:Field, или пустой xs:string). Фикс: value=="_" → <dcsset:right xsi:type="$vt"/> (vt из valueType или xs:string). Зеркало py. Формы ОтправкиОтчетности/ФормаЭлемента (dcscor:Field) → match; чинит и Новости (xs:string пустой в object-форме). Кейс input-fields (+CA фильтр с пустым dcscor:Field) сертифицирован в 1С. Регресс 43/43 (ps1+py). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9900f8f656
commit
2ab1b5bc14
@@ -1,4 +1,4 @@
|
||||
# form-compile v1.121 — Compile 1C managed form from JSON or object metadata
|
||||
# form-compile v1.122 — Compile 1C managed form from JSON or object metadata
|
||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||
param(
|
||||
[string]$JsonPath,
|
||||
@@ -1742,6 +1742,11 @@ function Emit-FilterItem {
|
||||
X "$indent`t`t<v8:variant xsi:type=`"v8:${sdType}Variant`">$(Esc-Xml $variant)</v8:variant>"
|
||||
if ($hasDate) { X "$indent`t`t<v8:date>$(Esc-Xml $dateV)</v8:date>" }
|
||||
X "$indent`t</dcsset:right>"
|
||||
} elseif ("$($item.value)" -eq '_') {
|
||||
# "_" — маркер пустого значения: платформа эмитит пустой self-closing <dcsset:right>
|
||||
# (напр. <dcsset:right xsi:type="dcscor:Field"/> — сравнение с незаданным полем).
|
||||
$vt = if ($item.valueType) { "$($item.valueType)" } else { 'xs:string' }
|
||||
X "$indent`t<dcsset:right xsi:type=`"$vt`"/>"
|
||||
} elseif ($null -ne $item.value) {
|
||||
$vt = if ($item.valueType) { "$($item.valueType)" } else { "" }
|
||||
if (-not $vt) {
|
||||
|
||||
Reference in New Issue
Block a user