Skip to content

Use type to detect password fields in integrations instead of name

What does this MR do?

When updating integration settings, password fields only need to be filled in if the user wants to change them, otherwise the previous values would be preserved.

This relied on clearing blank params with the name password, but some integrations use a different name, such as api_key in the Datadog integration. So instead we check for fields with type: 'password', which is also what the frontend does to decide how to render these fields in the DynamicField component.

Fixes #328239 (closed)

How to setup and validate locally (strongly suggested)

  1. Create a project and go to Settings → Integrations
  2. Open the Atlassian Bamboo integration, fill the form with dummy values, and save it (making sure it succeeds).
  3. Save the form again, and see that no validation errors are shown.
  4. Do the same with the Datadog integration (saving the second time without any changes), and see the validation errors for the API key field.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #328239 (closed)

Merge request reports

Loading