Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security GenAI] When a "global" Knowledge Base entry…
… is updated to "private", a duplicate "private" entry gets created and the global entry remains unchanged (#197157) (#197516) (#197919) # Backport This will backport the following commits from `main` to `8.x`: - [[Security GenAI] When a "global" Knowledge Base entry is updated to "private", a duplicate "private" entry gets created and the global entry remains unchanged (#197157) (#197516)](#197516) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T22:45:32Z","message":"[Security GenAI] When a \"global\" Knowledge Base entry is updated to \"private\", a duplicate \"private\" entry gets created and the global entry remains unchanged (#197157) (#197516)\n\n## Summary\r\n\r\nOriginal ticket describing the BUG:\r\nhttps://github.com//issues/197157\r\n\r\nThese changes fix two issues:\r\n1. Updating an entry from Global to Private duplicates it. After\r\ndiscussing with the team we decided that this is an expected behaviour\r\nand we would add a modal dialog which warns users about it. See more\r\ndetails here\r\nhttps://github.com//issues/197157#issuecomment-2432592394\r\n2. Editing Private entry and switching the sharing option twice from\r\nPrivate => Global => Private causes the issue where we would treat\r\nselected entry as a new one and thus calling \"create entry\" instead of\r\n\"update\".\r\n\r\n### Steps to reproduce second issue:\r\n\r\n* Edit private entry\r\n* Update entry's name\r\n* Switch sharing option to Global\r\n* Switch sharing option back to Private\r\n* Save the entry\r\n\r\n**Current behaviour**: a new private entry is created\r\n**Expected behaviour**: existing private entry is updated\r\n\r\n### Screen recording of the fixed first issue\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e11e14bd-c557-401e-a23f-e01ac7aedf30\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d17fc09034d69f15748ddb0a49eae78959401c5a","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","backport:prev-minor","Team:Security Generative AI","v8.16.0"],"title":"[Security GenAI] When a \"global\" Knowledge Base entry is updated to \"private\", a duplicate \"private\" entry gets created and the global entry remains unchanged (#197157)","number":197516,"url":"https://github.com/elastic/kibana/pull/197516","mergeCommit":{"message":"[Security GenAI] When a \"global\" Knowledge Base entry is updated to \"private\", a duplicate \"private\" entry gets created and the global entry remains unchanged (#197157) (#197516)\n\n## Summary\r\n\r\nOriginal ticket describing the BUG:\r\nhttps://github.com//issues/197157\r\n\r\nThese changes fix two issues:\r\n1. Updating an entry from Global to Private duplicates it. After\r\ndiscussing with the team we decided that this is an expected behaviour\r\nand we would add a modal dialog which warns users about it. See more\r\ndetails here\r\nhttps://github.com//issues/197157#issuecomment-2432592394\r\n2. Editing Private entry and switching the sharing option twice from\r\nPrivate => Global => Private causes the issue where we would treat\r\nselected entry as a new one and thus calling \"create entry\" instead of\r\n\"update\".\r\n\r\n### Steps to reproduce second issue:\r\n\r\n* Edit private entry\r\n* Update entry's name\r\n* Switch sharing option to Global\r\n* Switch sharing option back to Private\r\n* Save the entry\r\n\r\n**Current behaviour**: a new private entry is created\r\n**Expected behaviour**: existing private entry is updated\r\n\r\n### Screen recording of the fixed first issue\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e11e14bd-c557-401e-a23f-e01ac7aedf30\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d17fc09034d69f15748ddb0a49eae78959401c5a"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197516","number":197516,"mergeCommit":{"message":"[Security GenAI] When a \"global\" Knowledge Base entry is updated to \"private\", a duplicate \"private\" entry gets created and the global entry remains unchanged (#197157) (#197516)\n\n## Summary\r\n\r\nOriginal ticket describing the BUG:\r\nhttps://github.com//issues/197157\r\n\r\nThese changes fix two issues:\r\n1. Updating an entry from Global to Private duplicates it. After\r\ndiscussing with the team we decided that this is an expected behaviour\r\nand we would add a modal dialog which warns users about it. See more\r\ndetails here\r\nhttps://github.com//issues/197157#issuecomment-2432592394\r\n2. Editing Private entry and switching the sharing option twice from\r\nPrivate => Global => Private causes the issue where we would treat\r\nselected entry as a new one and thus calling \"create entry\" instead of\r\n\"update\".\r\n\r\n### Steps to reproduce second issue:\r\n\r\n* Edit private entry\r\n* Update entry's name\r\n* Switch sharing option to Global\r\n* Switch sharing option back to Private\r\n* Save the entry\r\n\r\n**Current behaviour**: a new private entry is created\r\n**Expected behaviour**: existing private entry is updated\r\n\r\n### Screen recording of the fixed first issue\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e11e14bd-c557-401e-a23f-e01ac7aedf30\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d17fc09034d69f15748ddb0a49eae78959401c5a"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <[email protected]>
- Loading branch information