Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.16] [ResponseOps][Cases] Introduce number custom field type (#195245) #198259

Closed

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.16:

Questions ?

Please refer to the Backport tool documentation

Issue: elastic#187208

In this PR I've added new number custom field. It includes both: FE and
BE.
Only safe integers (the safe integers consist of all integers from
-(2^53 - 1) to 2^53 - 1) are allowed as values.

Testing:
For testing Postman/Insomnia can be used.
Go to Case - Settings. New configure will be created.
After that you can use this endpoint:
`PATCH
http://localhost:5601/hcr/api/cases/configure/7377ed43-af0c-46f1-bbe5-fd0b147d591d`

<details><summary>Body looks something like this:</summary>

{
    "closure_type": "close-by-user",
    "customFields": [
        {
            "type": "number",
            "key": "54d2abf2-be0e-4fec-ac33-cbce94cf1a10",
            "label": "num",
            "required": false,
            "defaultValue": 123
        },
        {
            "type": "number",
            "key": "6f165838-a8d2-49f7-bbf6-ab3ad96d0d46",
            "label": "num2",
            "required": false,
            "defaultValue": -10
        }
    ],
    "templates": [],
    "connector": {
        "id": "none",
        "type": ".none",
        "fields": null,
        "name": "none"
    },
    "version": "WzIyLDFd"
}

</details>

![Screenshot 2024-10-07 at 16 23
15](https://github.com/user-attachments/assets/2d769049-e339-47bb-a17d-189569b8785d)

Try different numbers: positive and negative. Try to add not number
types as a default value with `"type": "number"`

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 7cad9c3)
@cnasikas
Copy link
Member

Due to a mistake in the labels the backport bot opened the PR. Closing as we do not want to backport this in 8.16.

@cnasikas cnasikas closed this Oct 30, 2024
auto-merge was automatically disabled October 30, 2024 10:28

Pull request was closed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 812 819 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 492.1KB 492.2KB +93.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cases 151.2KB 157.4KB +6.2KB

cc @guskovaue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants