daniellau88 / pe

0 stars 0 forks source link

Data not discarded when invalid JSON file #3

Open daniellau88 opened 3 years ago

daniellau88 commented 3 years ago

According to documentation, ModuleBook3.5 should discard the data if it is invalid. However, the following changes to the JSON file is alright (the startTime should be before the deadline).

image.png

{
  "tasks" : [ {
    "name" : "abcd",
    "startTime" : "2021-09-21",
    "deadline" : "2021-09-20",
    "module" : "CS2040S",
    "description" : "asdf aasa阿斯顿法askdjflasjdfklja",
    "workload" : "3",
    "doneStatus" : "false",
    "recurrence" : "weekly",
    "tagged" : [ ]
  } ]
}

Edit: The following JSON does not start the program at all

{
  "tasks" : [ {
    "name" : "TP",
    "startTime" : "",
    "deadline" : "2021-01-20 20:00",
    "module" : "CS2103T",
    "description" : "Team tasks",
    "workload" : "3",
    "doneStatus" : "false",
    "recurrence" : "",
    "tagged" : [ "tagname" ]
  }, {
    "name" : "hii",
    "startTime" : "2021-03-07 08:30",
    "deadline" : "2021-03-07 10:30",
    "module" : "CS1231",
    "description" : "Not include CSP.",
    "workload" : "1",
    "doneStatus" : "false",
    "recurrence" : "",
    "tagged" : [ "byeee", "highPriority" ]
  }, {
    "name" : "Team Project",
    "startTime" : "2021-03-15 14:00",
    "deadline" : "2021-03-21 23:10",
    "module" : "CS2103T",
    "description" : "Finish User Guide",
    "workload" : "2",
    "doneStatus" : "true",
    "recurrence" : "",
    "tagged" : [ ]
  } ]
}
nus-pe-bot commented 3 years ago

Team's Response

Thank you for pointing this out.

First bug is a duplicate of issue #994.

For the second bug: 1) The severity of this bug should be Low as the json files being manually edited is not commonplace and is not considered a normal operation. Normal users will not go into the json file to change his/her module into an invalid/unsupported one.

2) Furthermore, we provided a table in the UG that shows a table of supported modules, and CS1231 is not in the list as one of our group members clarified with SoC that our target audience (Year 2 Computer Science Students stated in DG) are not allowed to take CS1231. CS students should take CS1231S instead. CS1231S is in the table we provided.

3) As an advanced user who chooses to edit the json file manually, he/she should have read the UG well to realize CS1231 is not a supported module code, and will input valid module codes based on the table we provided in the UG. Thus, we feel that this bug report is not in scope.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: Hi, it is explicitly stated in your UG that edits to the JSON file are welcomed. So the issue should not be out of scope.

image.png

Secondly, the UG states that the expected behavior when invalid data is inputted into the JSON is to discard all data and start with an empty file. However, this was not the expected behavior observed, and hence should be considered a functionality bug.


:question: Issue type

Team chose [type.FunctionalityBug] Originally [type.FeatureFlaw]

Reason for disagreement: [replace this with your explanation]


:question: Issue severity

Team chose [severity.Low] Originally [severity.Medium]

Reason for disagreement: [replace this with your explanation]