Skip to content
Snippets Groups Projects

Allow users to reset DAST submit field

Merged Dheeraj Joshi requested to merge djadmin-dast-submit-field-reset into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Simon Knox resolved all threads

    resolved all threads

  • Simon Knox approved this merge request

    approved this merge request

  • merged

  • @psimyn, did you forget to run a pipeline before you merged this work? Based on our code review process, if the latest pipeline finished more than 2 hours ago, you should:

    1. Ensure the merge request is not in Draft status.
    2. Start a pipeline (especially important for Community contribution merge requests).
    3. Set the merge request to merge when pipeline succeeds.

    (Improve this message?)

  • Simon Knox mentioned in commit 1626ba33

    mentioned in commit 1626ba33

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading