shuyangk / pe

0 stars 0 forks source link

Does not handle when extra parameters are included in localcourse add command #2

Open shuyangk opened 10 months ago

shuyangk commented 10 months ago

The given command format for adding a local course is localcourse add [localcode] [localname] [unit] [description]. However if an extra parameter is included in square brackets, the last parameter is discarded. Perhaps handling this error would be better to catch instances where users may accidentally include more than one of the same parameter.

In the following case, "4.0" is the module unit, but including it twice replaces the initial description.

Before: image.png

After: image.png

nus-se-bot commented 10 months ago

Team's Response

[4.0] is interpreted as the argument to the parameter that is description. Thus, it is correct behaviour that you are trying to update the description to be 4.0. Parameters that exceeds the count accepted will be discarded though.

The 'Original' Bug

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

Having two different course attributes to be updated in localcourse produces unintended behaviour

When updating the attributes of a localcourse, if two attributes such as localcourse and units are entered as inputs, the program accepts it, and does not update the actual parameter inputted at the back. Perhaps when excessive inputs are entered as parameters the app could handle this as an invalid input.

image.png

In this case, cs1001 was updated with localcode becoming unit, while the intended new localcode is discarded.

image.png


[original: nus-cs2103-AY2324S1/pe-interim#2182] [original labels: severity.Low type.FeatureFlaw]

Their Response to the 'Original' Bug

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

[unit] is interpreted as the argument to the parameter. Thus, it is correct behaviour that you are trying to update the localcode to the value unit, which is possible. For instance unit could be the course code for a course on unit testing.

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]


## :question: Issue response Team chose [`response.Rejected`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]