Moodle
  1. Moodle
  2. MDL-30375

Comments block disappears when cancel is clicked

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Blocks, Commenting
    • Labels:
    • Environment:
      qa.moodle.net
    • Testing Instructions:
      Hide

      NOTE: This needs to be tested under 20, 21 and master (22):

      WARN: The instructions related in MDLQA need amending before testing. Please delete this warning once they have been fixed. TIA!

      Modified test instructions:
      1. Login as a student, browse to a course and enter a comment in the comments block.
      2. Login as a teacher, browse to the course and add a comment.
      3. Delete the comment.
      4. Delete the student's comment.

      Show
      NOTE: This needs to be tested under 20, 21 and master (22): WARN: The instructions related in MDLQA need amending before testing. Please delete this warning once they have been fixed. TIA! Modified test instructions: 1. Login as a student, browse to a course and enter a comment in the comments block. 2. Login as a teacher, browse to the course and add a comment. 3. Delete the comment. 4. Delete the student's comment.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      wip-mdl-30375
    • Rank:
      32984

      Description

      From the QA test:

      When canceling comment (before saving it), the whole block content, i.e. all previous comments and the comment field itself disappear. The block title remains untouched.

        Issue Links

          Activity

          Hide
          Nicolas Martignoni added a comment -

          Steps to reproduce:
          1. Login (as a student or teacher, didn't test as a manager or admin)
          2. Write a comment in Comments block
          3. Click on Cancel button (don't save)

          Result: the Comments block content, i.e. all previous comments and the comment field itself, disappear. The block title remains untouched. Refreshing the browser display (F5 or cmd-R) makes the block content reappear normally.

          Show
          Nicolas Martignoni added a comment - Steps to reproduce: 1. Login (as a student or teacher, didn't test as a manager or admin) 2. Write a comment in Comments block 3. Click on Cancel button (don't save) Result: the Comments block content, i.e. all previous comments and the comment field itself, disappear. The block title remains untouched. Refreshing the browser display (F5 or cmd-R) makes the block content reappear normally.
          Hide
          Rajesh Taneja added a comment -

          In addition to hiding issue, comment block was not showing "Add a comment". It appears only if user clicks in comment box and then click somewhere outside.

          This fix includes hiding issue and consistency in showing "Add a comment" message if comment box is empty.

          Show
          Rajesh Taneja added a comment - In addition to hiding issue, comment block was not showing "Add a comment". It appears only if user clicks in comment box and then click somewhere outside. This fix includes hiding issue and consistency in showing "Add a comment" message if comment box is empty.
          Hide
          Rajesh Taneja added a comment -

          Just saw Martin's comment for cancel functionality. Adding Martin to verify if this is a bug or not.

          Show
          Rajesh Taneja added a comment - Just saw Martin's comment for cancel functionality. Adding Martin to verify if this is a bug or not.
          Hide
          Martin Dougiamas added a comment -

          It's definitely a bug, not fixed in MDL-19839. Actually: can't we just get rid of the cancel link? I don't think we even need it.

          Show
          Martin Dougiamas added a comment - It's definitely a bug, not fixed in MDL-19839 . Actually: can't we just get rid of the cancel link? I don't think we even need it.
          Hide
          Rajesh Taneja added a comment -

          There are two things we can do:

          1. Get rid of it (As suggested by you)
          2. Hide it on page load and when user start typing we show cancel link.
          Show
          Rajesh Taneja added a comment - There are two things we can do: Get rid of it (As suggested by you) Hide it on page load and when user start typing we show cancel link.
          Hide
          Martin Dougiamas added a comment -

          +1 4 1

          Show
          Martin Dougiamas added a comment - +1 4 1
          Hide
          Martin Dougiamas added a comment -

          Just check carefully there are no regressions anywhere else that comments are used.

          Show
          Martin Dougiamas added a comment - Just check carefully there are no regressions anywhere else that comments are used.
          Hide
          Dongsheng Cai added a comment -

          Hi all

          It's possible just hide the cancel button (it doesn't do anything in this case), comment api takes `displaycancel` option, just need to make it false in comment block code.

          Show
          Dongsheng Cai added a comment - Hi all It's possible just hide the cancel button (it doesn't do anything in this case), comment api takes `displaycancel` option, just need to make it false in comment block code.
          Hide
          Rajesh Taneja added a comment -

          Sure... Will hide cancel button.
          One more question:
          Should we show "Add a comment" in comment box, when page loads or comment is saved?

          Show
          Rajesh Taneja added a comment - Sure... Will hide cancel button. One more question: Should we show "Add a comment" in comment box, when page loads or comment is saved?
          Hide
          Dongsheng Cai added a comment -

          Looks good to me.

          Show
          Dongsheng Cai added a comment - Looks good to me.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been integrated, thanks!

          NOTE: Surely this needs amending test instructions, both here and in the MDLQA! Plz, do.

          Show
          Eloy Lafuente (stronk7) added a comment - This has been integrated, thanks! NOTE: Surely this needs amending test instructions, both here and in the MDLQA! Plz, do.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Rajesh Taneja added a comment -

          Modified Test instructions on MDL, needs to be updated on MDLQA

          Show
          Rajesh Taneja added a comment - Modified Test instructions on MDL, needs to be updated on MDLQA
          Hide
          Adrian Greeve added a comment -

          The cancel button has been removed so that removes the problem

          Show
          Adrian Greeve added a comment - The cancel button has been removed so that removes the problem
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: