Teammates: Instructor: edit question: fix erratic behavior when editing followed by deleting

Created on 21 Jan 2018  路  8Comments  路  Source: TEAMMATES/teammates

Environment
master branch at 1c43cce but possibly has existed long before.

Steps to reproduce

  1. Edit a feedback question
  2. Clear the textarea of the question name
  3. Click "save", and validation message "Please enter a valid question. The question text cannot be empty"will show up.
  4. Retry saving.
  5. Click the "delete" button, press "yes" for the warning box. Validation message "Please enter a valid question. The question text cannot be empty" shows up again.
  6. Add a valid name for the name of the question so that it is no longer empty.
  7. Click "save", and now the question is deleted.

Expected behaviour
When deleting question after failing to edit it, the question should be deleted.
Correcting and saving the question after failing to delete it should still save the question.

Actual behaviour
When deleting question after failing to edit it, validation message "Please enter a valid question. The question text cannot be empty" popped out.
Correcting and saving the question after failing to delete it eventually delete the question.

help wanted p.Medium

All 8 comments

@LuLechuan, do follow the bug report template.

Corrected as requested.

@LuLechuan bug reports should be concise but precise enough so that it can be easily verified by maintainers. I helped you improve it this time.

@wkurniawan07 Noted with thanks, will do it properly next time.

@LuLechuan Are you working on this?

@sukanta-27 Hi, I actually have the solution. However, as this issue is still under investigating, so I haven't put it on PR.

@LuLechuan Okay.
By the way, FWIW I tested this on my system too, and could reproduce this bug.

@LuLechuan If the bug is reproducible, go ahead and submit a PR. Suggested: add a test case that fails due to the bug and then add the fix to make the test case pass.

Was this page helpful?
0 / 5 - 0 ratings