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.x] [ResponseOps][MW] Fix bug when creating repeating Maintenance Window (#207084) #208181

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

adcoelho
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…7228)

Fixes elastic#206801

When opening the case detail page we retrieve user profile info for the
different case user actions.

If the uid stored in ES is an empty string for any of these user
actions, we get an error that looks like this:

![Screenshot 2025-01-20 at 12 34
54](https://github.com/user-attachments/assets/175c6920-a4fb-4588-9668-1ba7d73f14f3)

1. Create a user with the `system_indices_superuser` role
2. Create a case and assign a user to it
3. Get the ID of the assignment user action from the case above
```
GET .kibana_alerting_cases/_search
{
  "query": {
    "bool": {
      "filter": [
        {
          "term": {
            "type": "cases-user-actions"
          }
        },
        {
          "term": {
            "cases-user-actions.type": "assignees"
          }
        },
        {
          "nested": {
            "path": "references",
            "query": {
              "bool": {
                "filter": [
                  {
                    "term": {
                      "references.type": "cases"
                    }
                  },
                  {
                    "term": {
                      "references.id": "<case_id>"
                    }
                  }
                ]
              }
            }
          }
        }
      ]
    }
  }
}
```
4. Manually set the `uid` of the assignee to `""`
```
POST .kibana_alerting_cases/_update/<cases-user-actions-id>
{
  "script": {
    "source": """
        ctx._source["cases-user-actions"].payload.assignees[0].uid = "";
    """
  }
}
```

After this PR the popup should **not** appear anymore.

(cherry picked from commit d8e5cbf)
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

@cnasikas cnasikas merged commit 8759f02 into elastic:8.x Jan 24, 2025
11 checks passed
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.

3 participants