minreiseah / pe

0 stars 0 forks source link

Invalid input in the `add` command increments the employee (unintended side-effect) #11

Open minreiseah opened 2 months ago

minreiseah commented 2 months ago

image.png In the screenshot above, the current employee is is 29.

When i try to add in the command above, say 6 times, and then add another person, the employee id is incremented 6 too many times. There is unexpected behaviour. The expected behaviour is that the employee id would increment by one,.

image.png

soc-se-bot commented 2 months ago

Team's Response

Exact same bug. Addressed in #56.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Issue with Employee ID

Issue: Even a person is not added successfully (e.g., not added bacause it's a duplicate), the employee ID number will still be used, which can be a bit confusing to users.

As shown in the following screenshot. After trying to add duplicate Oscar for several times (but not succeed), when I suceessully add a new employee thy, his/her employee ID is 36 rather than 31

screenshots

image.png


[original: nus-cs2103-AY2324S2/pe-interim#71] [original labels: type.FunctionalityBug severity.Low]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Good catch as it should not be increasing for failed inputs.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]