Open olivercheok20 opened 5 years ago
Thank you for raising the concern. The bug is rejected after various considerations.
While this is a valid bug, the problem of taking in the last parameter if there are duplicate prefixes is inherited from AB3.
For example, if I enter add n/Jack p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney n/Jane
in AB3, there are two n/
prefixes and the command will be executed successfully, with the actual name
added to be Jane
.
We can fix this bug in v2.0.
Team chose [response.Rejected
]
Reason for disagreement: [replace this with your reason]
Summary
When I enter in commands such as
find a/01 a/02
, the program returns the same result as if I had entered the commandfind a/02
Expected Behavior
As there are clearly two prefixes of the same type being entered, the command is invalid and an error message should be returned. (In the above example, if the user wanted to search
find a/01 02
but mistakenly typed infind a/01 a/02
, he would not be returned results that contain '01'. He should therefore be alerted that he entered an invalid command, lest he act upon incomplete data.)Current Behavior
The user is returned results that contain only keywords specified by the last mention of the prefix in the command. (i.e. if the user entered in
find a/01 a/02
, he is only returned results that contain '02')Possible Solution
The problem with this likely lies in the parser classes.