diff --git a/x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.test.ts b/x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.test.ts index 77a4cb95852c4..11fadf51f27f8 100644 --- a/x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.test.ts +++ b/x-pack/plugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.test.ts @@ -283,7 +283,11 @@ describe('', () => { const entirePolicy = JSON.parse(JSON.parse(latestRequest.requestBody).body); expect(entirePolicy.phases.cold).toMatchInlineSnapshot(` Object { - "actions": Object {}, + "actions": Object { + "set_priority": Object { + "priority": 0, + }, + }, "min_age": "0d", } `); diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_schema.ts b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_schema.ts index fb33a129b1429..070f03f74b954 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_schema.ts +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_schema.ts @@ -284,6 +284,7 @@ export const schema: FormSchema = { }, set_priority: { priority: { + defaultValue: '0' as any, label: i18nTexts.editPolicy.setPriorityFieldLabel, validations: [{ validator: ifExistsNumberNonNegative }], serializer: serializers.stringToNumber, diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_validations.ts b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_validations.ts index b51f33b3012e6..9c855ccb41624 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_validations.ts +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form_validations.ts @@ -22,7 +22,7 @@ const createIfNumberExistsValidator = ({ return (arg) => { if (arg.value) { return numberGreaterThanField({ - than: 0, + than, message, })({ ...arg,