opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
85 stars 67 forks source link

Admin can create a webhook without selecting the data to be contained in the webook payload #7089

Open prinzab opened 4 months ago

prinzab commented 4 months ago

Bug description: Admin can create a webhook without selecting the data from the checkboxes to be contained within the webhook payload

Steps to reproduce:

  1. Click Configuration > Integrations
  2. Click the Create client button
  3. Enter a name for the client
  4. Select Webhook as the type
  5. Leave the checkboxes for type of data for birth and death unselected
  6. Click the Create button
  7. Observe

Actual result:

  1. The Create button is active without selecting any data to be contained within the webhook payload
  2. The webhook is created without selecting any data to be contained within the webhook payload

Expected result:

  1. The Create button should be disabled if there is no selection of data (births / deaths) to be contained within the webhook payload
  2. The webhook should not be created without selecting any data to be contained within the webhook payload

Environment: https://login.farajaland-qa.opencrvs.org/

Version: v1.5.0

Screenshots

Screenshot 2024-05-31 at 19 37 34
Zangetsu101 commented 4 months ago

There could be a case where a system just wants to be notified of an event and don't require any other details

SyedaAfrida commented 4 months ago

@Zangetsu101 in that case I guess the Label should not be marked as mandatory

euanmillar commented 4 months ago

@eduffus @SyedaAfrida I think these checkboxes are technical debt. Control over the webhook payload contents was assumed to be something interoperating systems may want but no one has requested it. I think that we should re-design this and deprecate this feature as it currently is.

eduffus commented 3 months ago

Agree this is not a priority and will most likely get redesigned. In its current form a quick low priority fix would be to remove the "required" asterisk.