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

[SIEM] Fix auto save for template timeline #65001

Merged
merged 8 commits into from
May 5, 2020

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented May 1, 2020

Summary

  1. Fix aoto-save for template timeline
    I found a bug in my create template timeline PR, it is after updating a template timeline, it becomes a normal timeline as I didn't add relevant attributes into open timeline's modal
templateTimelineId
templateTimelineVersion
timelineType

so we didn't sent the right info when persisting timeline.
also after I adding these, I still get a templateTimelineVersion conflict, therefore I'd like to update my persistTimeline api to allow sending the same templateTimelineVersion, and I'll bump the version from api's side.

  1. Allow template timeline to be update via import once template timeline id is given.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@angorayc angorayc requested review from a team as code owners May 1, 2020 14:42
@angorayc angorayc added release_note:skip Skip the PR/issue when compiling release notes Team:SIEM labels May 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@angorayc angorayc changed the title [SIEM] Handle bumping templateTimelineVersion in update_timelines_route [SIEM] Fix auto save for template timeline May 3, 2020
@angorayc
Copy link
Contributor Author

angorayc commented May 4, 2020

@elasticmachine merge upstream

@@ -236,6 +237,9 @@ export const createTimelineEpic = <State>(): Epic<
...savedTimeline,
savedObjectId: response.timeline.savedObjectId,
version: response.timeline.version,
timelineType: response.timeline.timelineType ?? TimelineType.default,
templateTimelineId: response.timeline.templateTimelineId ?? null,
templateTimelineVersion: response.timeline.templateTimelineVersion ?? null,
isSaving: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put these back as after updating/creating the timeline, we need to assign the value back to the store from api's response. Otherwise we might encounter with error like timeline's version conflict

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@angorayc angorayc merged commit 537065a into elastic:master May 5, 2020
angorayc added a commit to angorayc/kibana that referenced this pull request May 5, 2020
* update save timeline

* fix types

* allow template timeline to be updated via import

* fix unit tests

* fix for review

* handle update timeline

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
angorayc added a commit that referenced this pull request May 5, 2020
* update save timeline

* fix types

* allow template timeline to be updated via import

* fix unit tests

* fix for review

* handle update timeline

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants