danbaterisna / pe

0 stars 0 forks source link

Status field in save file not properly validated #3

Open danbaterisna opened 2 years ago

danbaterisna commented 2 years ago

Reproduction: With the following save file:

{"tasks": [
    {
        "by_date": " ",
        "identifier": 57517,
        "do_date_start": "21/5/2022 11:00",
        "description": "CS3230 tutorials [SUBMIT ASSIGNMENT 2]",
        "do_date_end": "21/5/2022 12:00",
        "status": " X "
    }
]}

open the application and execute show all. Note the spaces around the status field, when under normal operation, there should be none. It is plausible that, due to user error, such spaces may be added.

Expected behavior: Either the save file is not accepted (at least, not without a warning), due to the lack of a proper value, or the task is shown as marked.

Actual behavior: The save file is accepted (without any warnings), but the task is shown as unmarked:

image.png

nus-se-bot commented 2 years ago

Your response not required for this bug as the team has accepted the bug as it is.