mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Fix incorrect diff display after switching versions (#211901)](https://github.com/elastic/kibana/pull/211901) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-02-25T10:29:05Z","message":"[Security Solution] Fix incorrect diff display after switching versions (#211901)\n\n**Resolves: https://github.com/elastic/kibana/issues/208085**\n\n## Summary\n\nFixes a bug where incorrect diff was shown for ABC SOLVABLE cases in\nprebuilt rule upgrade flyout.\n\n### Before\n\n\nhttps://github.com/user-attachments/assets/cc56e115-24e9-4e6c-b5fc-26704c506137\n\n### After\n\n\nhttps://github.com/user-attachments/assets/c27978d7-76ce-4dd4-8b78-4680625cd922\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"8e3d423572beeab14ad4a2be2a77934c8eeafa43","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security Solution] Fix incorrect diff display after switching versions","number":211901,"url":"https://github.com/elastic/kibana/pull/211901","mergeCommit":{"message":"[Security Solution] Fix incorrect diff display after switching versions (#211901)\n\n**Resolves: https://github.com/elastic/kibana/issues/208085**\n\n## Summary\n\nFixes a bug where incorrect diff was shown for ABC SOLVABLE cases in\nprebuilt rule upgrade flyout.\n\n### Before\n\n\nhttps://github.com/user-attachments/assets/cc56e115-24e9-4e6c-b5fc-26704c506137\n\n### After\n\n\nhttps://github.com/user-attachments/assets/c27978d7-76ce-4dd4-8b78-4680625cd922\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"8e3d423572beeab14ad4a2be2a77934c8eeafa43"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211901","number":211901,"mergeCommit":{"message":"[Security Solution] Fix incorrect diff display after switching versions (#211901)\n\n**Resolves: https://github.com/elastic/kibana/issues/208085**\n\n## Summary\n\nFixes a bug where incorrect diff was shown for ABC SOLVABLE cases in\nprebuilt rule upgrade flyout.\n\n### Before\n\n\nhttps://github.com/user-attachments/assets/cc56e115-24e9-4e6c-b5fc-26704c506137\n\n### After\n\n\nhttps://github.com/user-attachments/assets/c27978d7-76ce-4dd4-8b78-4680625cd922\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"8e3d423572beeab14ad4a2be2a77934c8eeafa43"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
This commit is contained in:
parent
4c42363a7a
commit
e3b2b50939
2 changed files with 2 additions and 1 deletions
|
@ -50,6 +50,7 @@ export function FieldComparisonSide(): JSX.Element {
|
|||
useEffect(() => {
|
||||
if (
|
||||
selectedOption !== VersionsPickerOptionEnum.MyChanges &&
|
||||
prevResolvedValue !== undefined &&
|
||||
!isEqual(prevResolvedValue, resolvedValue)
|
||||
) {
|
||||
setSelectedOption(VersionsPickerOptionEnum.MyChanges);
|
||||
|
|
|
@ -102,7 +102,7 @@ export function getVersionsForComparison(
|
|||
case VersionsPickerOptionEnum.UpdateFromElastic:
|
||||
return hasBaseVersion ? [Version.Base, Version.Target] : [Version.Current, Version.Target];
|
||||
case VersionsPickerOptionEnum.Merged:
|
||||
return [Version.Base, Version.Target];
|
||||
return [Version.Base, Version.Final];
|
||||
default:
|
||||
return assertUnreachable(selectedOption);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue