chownces / pe

0 stars 0 forks source link

Import by relative path does not work as expected #5

Open chownces opened 3 years ago

chownces commented 3 years ago

According to the UG, the CSV file can be specified relative to the .jar application. However, the following command does not work as expected.

UG:

image.png

Screenshot of error:

image.png

To reproduce:

  1. Place the CSV file in the same folder as the jar file
  2. Try importing it by relative file path e.g. ./{filename}.csv
  3. The command throws an error, although the file path is valid
nus-pe-bot commented 2 years ago

Team's Response

No details provided by team.

Items for the Tester to Verify

:question: Issue response

Team chose [response.CannotReproduce]

Reason for disagreement: Perhaps I was not explicit enough. This bug is in fact reproducible. The bug is that the filepath is not relative to the location of the .jar file, but rather relative to the directory where the java -jar command is being run. Thus, this is a functionality bug as the description does not match the actual behaviour of the application, and the implementation needs to be updated.

As per the screenshot example in the original bug report:

Directory structure:

| Downloads
       |
pe
            | xxx.jar
            |
yyy.csv

  1. The java -jar command is being run from the Downloads directory. (e.g. java -jar pe/xxx.jar)
  2. Try import ./yyy.csv in the app. This will show the error as per the screenshot in the original bug report.
  3. However, import ./pe/yyy.csv works, thus revealing this implementation error (that filepath is not actually relative to the .jar file).

This is an occasional inconvenience to some users who encounter the exact situation above, but they are still able to use the app (albeit without the import feature if they do not know how to work around this bug). Thus I would like to consider this a MEDIUM bug.

image.png