bjhoohaha / pe

0 stars 0 forks source link

Unable to edit category #4

Open bjhoohaha opened 4 years ago

bjhoohaha commented 4 years ago

Edited a category but was prompted that the foodname already exists

Screenshot 2019-11-15 at 5.10.07 PM.png

This can only be replicated with the following JSON file:

{
  "foods" : [ {
    "name" : "Test",
    "price" : "2134.00",
    "description" : "Spicy",
    "category" : "test 4",
    "tagged" : [ ],
    "location" : "213123",
    "openingHours" : "1234 2359",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese chinese",
    "tagged" : [ "nice" ],
    "location" : ".Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese chinese",
    "tagged" : [ "nice" ],
    "location" : ".393412#!@#!@#",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese chinese",
    "tagged" : [ "nice" ],
    "location" : "Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese chines",
    "tagged" : [ "nice" ],
    "location" : ".Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese chines",
    "tagged" : [ "nice" ],
    "location" : "Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Veget"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese",
    "tagged" : [ "nice" ],
    "location" : ".Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "chinese chinese",
    "price" : "9.80",
    "description" : "Japanese curry",
    "category" : "chinese",
    "tagged" : [ "nice" ],
    "location" : "Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese",
    "tagged" : [ "nice" ],
    "location" : "Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Test",
    "price" : "2134.00",
    "description" : "Spicy",
    "category" : "chinese",
    "tagged" : [ ],
    "location" : "213123",
    "openingHours" : "1201 2300",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Test",
    "price" : "2134.00",
    "description" : "Spicy",
    "category" : "chinese",
    "tagged" : [ ],
    "location" : "213123",
    "openingHours" : "1200 2300",
    "restrictions" : "Vegetarian"
  }, {
    "name" : "Mala",
    "price" : "9.80",
    "description" : "Spicy",
    "category" : "chinese",
    "tagged" : [ "nice" ],
    "location" : ".   Singapore",
    "openingHours" : "1900 2000",
    "restrictions" : "Vegetarian"
  } ]
}
nus-pe-bot commented 4 years ago

Team's Response

Team's Response

Thank you very much for the Response!

However, this is not a bug, and the feature works as expected. Duplicate foods have the same name, category, description, locations, restrictions and opening hours,

image

Hence, what you are trying to do is allocate two duplicate foods into the food list. As a result, the error is thrown. Therefore, we will be rejecting this issue.

Duplicate status (if any):

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: [replace this with your reason]