Skip to content

Display correct label for named-list report types

What does this MR do?

It fixes an issue for the generic-security-report type named-list.

Give the following data:

        "comments": {
          "name": "Comments",
          "type": "named-list",
          "items": {
            "comment_1": {
              "name": "Fred:",
              "type": "text",
              "value": "Hi Wilma"
            },
            "comment_2": {
              "name": "Wilma:",
              "type": "markdown",
              "value": "Hi Fred. Checkout [GitLab](http://gitlab.com)"
            },
            "resources": {
              "name": "Resources",
              "type": "list",
              "items": [
                {
                  "type": "value",
                  "value": "42"
                }
              ]
            }

It currently uses the key of each object within items as the name for each item.

This is not correct, as the name property should be use.

Screenshots or Screencasts (strongly suggested)

before after
gdk.test_3000_root_fixed-generic-reports_-_security_vulnerabilities_777 gdk.test_3000_root_fixed-generic-reports_-security_vulnerabilities_777__1

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #335057 (closed)

Edited by David Pisek

Merge request reports

Loading