nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Cannot add Claim with same ID after deleting Insurance containing same ID #3991

Open nus-pe-bot opened 14 hours ago

nus-pe-bot commented 14 hours ago

Steps to Reproduce:

  1. Add insurance to a client
  2. Add claim to the insurance
  3. Delete the Insurance containing the claim
  4. Add same type of Insurance (or any existing Insurance will still have this problem)
  5. Add claim to that insurance with the same claim ID as step 2
  6. outputs: "A claim with id: A1234 has already been added to this client: Charlotte Oliveiro"

Details: When deleting a insurance that contains a claim with a certain ID, and we try to add this insurance type again, then add a claim with the same ID, this is not allowed. Seems like there is a bug within the system that keeps the Claim ID to detect.

Solution: Check the code for any potential bug during the deleteInsurance process, especially in terms of the claims that are stored for that Insurance.


[original: nus-cs2103-AY2425S1/pe-interim#3981] [original labels: severity.Medium type.FunctionalityBug]

RezwanAhmed123 commented 6 hours ago

Team's Response

Thanks for raising this. Indeed, it didn't occur to us. But now that we have thought about it, we still feel that this is a very rare case that users will face as we feel this will be the possible workflow in general:

  1. user adds a wrong insurance plan
  2. user realises the wrong insurance plan was added
  3. user deletes the insurance plan

Its also rare to delete the entire insurance plan after claims have been added (unless the client no longer uses said plan, in which case the claim ids should not be reused anyways).

As such we feel that the workflow presented in the bug report will not occur often and as such the bug, while accepted should be considered a Severity.Low type of bug.

Duplicate status (if any):

--