Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79801

Tags custom report entity "flagged" value incorrectly calculated

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-79801-401
    • MDL-79801-403
    • Hide

      Setup

      1. Log in as admin
      2. Edit your profile
        • List of interests: Cat, Dog
      3. View your profile
      4. Press the Cat tag under Interests
      5. Press Flag as inappropriate
      6. Create a new user
      7. Log out
      8. Log in as new user
      9. Manually navigate to:

        <WWWROOT>/tag/search.php
        

      10. Press Cat
      11. Press Flag as inappropriate
      12. Log out

      Create report

      1. Log in as admin
      2. Navigate to Reports from user menu
      3. Create new report from Tags report source
        • Include default setup: No
      4. In editor, add the following columns:
        • Tag collection: Name
        • Tag: Tag name
        • Tag: Tag flagged
      5. Confirm the Cat tag shows Yes for flagged
      6. Confirm the Dog tag shows No for flagged
      7. Add the following condition:
        • Tag: Tag flagged = Yes
        • Apply
      8. Confirm only the Cat tag is shown in the report
      9. Delete the Tag flagged condition
      10. Delete the Tag name column
      11. Set the aggregation for the Tag flagged column to Percentage
      12. Confirm the aggregated value shows 50%
      Show
      Setup Log in as admin Edit your profile List of interests: Cat, Dog View your profile Press the Cat tag under Interests Press Flag as inappropriate Create a new user Log out Log in as new user Manually navigate to: <WWWROOT>/tag/search.php Press Cat Press Flag as inappropriate Log out Create report Log in as admin Navigate to Reports from user menu Create new report from Tags report source Include default setup: No In editor, add the following columns: Tag collection: Name Tag: Tag name Tag: Tag flagged Confirm the Cat tag shows Yes for flagged Confirm the Dog tag shows No for flagged Add the following condition: Tag: Tag flagged = Yes Apply Confirm only the Cat tag is shown in the report Delete the Tag flagged condition Delete the Tag name column Set the aggregation for the Tag flagged column to Percentage Confirm the aggregated value shows 50%

      The tag entity isn't correctly determining the "flagged" state of a tag, in both the column and filter

      The implementation assumes that it is stored as a boolean field (0/1), however it isn't - it stores the number of times that the tag has been flagged (0..X)

      This means when you have simple data like this (for a tag that has been flagged multiple times):

      The filtering doesn't match it:

      & the aggregation isn't correct (should be 50%):

      Discovered while working on MDL-79788

            pholden Paul Holden
            pholden Paul Holden
            Carlos Castillo Carlos Castillo
            Huong Nguyen Huong Nguyen
            Amaia Anabitarte Amaia Anabitarte
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 35 minutes
                2h 35m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.