-
[OPIK-4514] [BE] Add ability to clear dataset item description (#5378)
发布于
2026-02-25 10:17:24 +00:00 - [OPIK-4514] [BE] Add clearDescription field to dataset items
Add ability to clear a previously-set description on a dataset item
using the clearDescription boolean flag, following the existing
clearExecutionPolicy pattern.Changes:
- DatasetItemEdit: add clearDescription field
- DatasetItemUpdate: add clearDescription field
- DatasetItemVersionDAO: update EDIT_ITEM_VIA_SELECT_INSERT and
BATCH_UPDATE_ITEMS SQL templates with clear_description conditional - Tests: add clear description tests for applyChanges and batch update
Implements OPIK-4514: [BE] Add ability to clear dataset item description
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 2: Switch to Option A — relax validation instead of clearDescription boolean
Per review feedback: remove clearDescription boolean field and instead
relax @Pattern(NULL_OR_NOT_BLANK) validation on description in
DatasetItemEdit and DatasetItemUpdate, allowing empty string "" to
clear the description. The DAO already stores "" and the result mapper
returns null for blank strings, so no DAO template changes needed.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- Revision 3: Remove extra text from @Schema descriptions
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
下载附件