Skip to content

Allow users to reset DAST submit field

Dheeraj Joshi requested to merge djadmin-dast-submit-field-reset into master

What does this MR do and why?

Problem: At the moment, it's not possible to reset DAST "submit field" for a site profile.

Why: When a user tries to empty the value of existing "submit field" from site profile, frontend do not send the field at all in the graphql mutation. This is because frontend do not send empty values in the mutation variables by default.

Solution: Make an exception for optional field

Screenshots or screen recordings

Please notice the submitField is now being sent to the graphql request

before after
image image

How to set up and validate locally

  1. Create a site profile and save a submit field value
  2. Now edit the profile and try to remove the value
  3. It should now be able to save an empty value

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports