Moodle
  1. Moodle
  2. MDL-31203

Advanced Forum Search - Searching using "Posts must be older than this:" Always reverts dateto:943938000 Nov. 30 1999

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Navigate to a Course>forum
      2. click on search forum on top right, this should take you to advanced search forum
      3. Try the different combination of "posts must be newer than this" and "post musts be older than this" and make sure it works as expected.
      Show
      Navigate to a Course>forum click on search forum on top right, this should take you to advanced search forum Try the different combination of "posts must be newer than this" and "post musts be older than this" and make sure it works as expected.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      master_MDL-31203_advanced_forum_search_always_reverts_date_from_and_to
    • Rank:
      37653

      Description

      Doing an advanced forum search, leaving all fields blank and searching for "Posts must be older than this:" - inserting any date - Upon clicking search the error "No posts containing 'dateto:943938000' were found" is displayed and the date is reverted to November 30 1999

      Replication steps:

      1. Navigate to a Course.
      2. Then in the Activities block - click Forums so it displays all Forums
      3. Then click on search forums at the top right so it takes you to the advanced search page.
      4. Then try to search using "Post must be older than"

      Result:

      "No posts containing 'dateto:943938000' were found" is displayed and the date is reverted to November 30 1999

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this.

        I've put it on our backlog.

        In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

        Show
        Michael de Raadt added a comment - Thanks for reporting this. I've put it on our backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
        Show
        Kanika Goyal added a comment - - edited Hi, Here is a patch for this - master - https://github.com/kanikagoyal/moodle/compare/master...master_MDL-31203_advanced_forum_search_always_reverts_date_from_and_to MOODLE_22_STABLE - https://github.com/kanikagoyal/moodle/compare/MOODLE_22_STABLE...m22_MDL-31203_advanced_forum_search_always_reverts_date_from_and_to MOODLE_21_STABLE - https://github.com/kanikagoyal/moodle/compare/MOODLE_21_STABLE...m21_MDL-31203_advanced_forum_search_always_reverts_date_from_and_to MOODLE_20_STABLE - https://github.com/kanikagoyal/moodle/compare/MOODLE_20_STABLE...m20_MDL-31203_advanced_forum_search_always_reverts_date_from_and_to Thanks, Kanika
        Hide
        Helen Foster added a comment -

        According to a discussion on moodle.org http://moodle.org/mod/forum/discuss.php?d=200659 it seems there is also a problem when searching using the option 'Posts must newer than this'. Just noting this in case it is relevant to this issue.

        Show
        Helen Foster added a comment - According to a discussion on moodle.org http://moodle.org/mod/forum/discuss.php?d=200659 it seems there is also a problem when searching using the option 'Posts must newer than this'. Just noting this in case it is relevant to this issue.
        Hide
        Ankit Agarwal added a comment - - edited

        Hi Kanika,
        Thanks for the patch. Patch looks perfect to me, sending this for review.

        PS:- This patch also resolves the issue, Helen is pointing out.
        PS2:- I am not sure why we are using so many globals in here. This needs to be cleaned up sometime.
        PS3:- The message given to user, when no post is found, should use normal English details of time constraints instead of displaying timestamps. I will create an issue for that.(Edit:- created MDL-33996)

        Thanks

        Show
        Ankit Agarwal added a comment - - edited Hi Kanika, Thanks for the patch. Patch looks perfect to me, sending this for review. PS:- This patch also resolves the issue, Helen is pointing out. PS2:- I am not sure why we are using so many globals in here. This needs to be cleaned up sometime. PS3:- The message given to user, when no post is found, should use normal English details of time constraints instead of displaying timestamps. I will create an issue for that.(Edit:- created MDL-33996 ) Thanks
        Hide
        Rajesh Taneja added a comment -

        Thanks Kanika and Ankit,

        Patch looks spot-on, pushing it for integration review.

        Show
        Rajesh Taneja added a comment - Thanks Kanika and Ankit, Patch looks spot-on, pushing it for integration review.
        Hide
        Dan Poltawski added a comment -

        Thanks Kanika and Ankit.

        I've integrated this to master, 23 and 22 (branches supported for bugfixes).

        Show
        Dan Poltawski added a comment - Thanks Kanika and Ankit. I've integrated this to master, 23 and 22 (branches supported for bugfixes).
        Hide
        Tim Barker added a comment -

        Congrats this issue has passed testing on the fixed branches.

        Show
        Tim Barker added a comment - Congrats this issue has passed testing on the fixed branches.
        Hide
        Sam Hemelryk added a comment -

        Congratulations your code is upstream - gold star for you!

        This issue + 79 others made it in in time for the minor releases.
        Thank you everyone involved for your exuberant efforts.

        Show
        Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

          People

          • Votes:
            23 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: