Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 299
  • Merge Requests 42
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !381

Closed
Opened 3 weeks ago by Ben Hayward@benhayward.ben
Report abuse

[Sprint/PinkPanther](fix): Refactored logic for moderation queue to not query Cassandra for post count.

Summary

Closes #1031

Currently on the production stack, if you moderate an older group, you will likely have posts still counted in your moderation queue, showing "4 posts unapproved", when you click, there is none.

Testing

This should be tested on a subdomain connected to production. If you do not have access to such a group ask me, and I will arrange that.

Request to merge fix/group-moderation-count-1031 into master
Pipeline #90258975 passed for ed6ae651 on fix/group-moderation-count-1031
          Requires 3 more approvals from Devs, Deployers, and QA.
          Emiliano Balbuena
          Emiliano Balbuena
          Martin Santangelo
          Martin Santangelo
          Marcelo Rivera
          Marcelo Rivera
          Guy Thouret
          Guy Thouret
          Mark Harding
          Mark Harding

          Closed by Ben Hayward 1 hour ago

          The changes were not merged into master

          Did not close #1031

          Deletes source branch

          • Discussion 2
          • Commits 1
          • Pipelines 1
          • Changes 1
          0/1 thread resolved
          • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Yellow scoped labels 3 weeks ago

            added scoped labels

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 3 weeks ago
            Last updated by Ben Hayward 3 weeks ago
            Controllers/api/v1/groups/review.php
            37 37 $feeds = Core\Di\Di::_()->get('Groups\Feeds');
            38 38 $feeds->setGroup($group);
            39 39
            40 $count = $feeds->count();
            40 $limit = isset($_GET['limit']) ? (int) $_GET['limit'] : 12;
            41 $offset = isset($_GET['offset']) ? $_GET['offset'] : '';
            41 42
            43 $result = $feeds->getAll([ 'limit' => $limit, 'offset' => $offset ]);
            44 $activities = Factory::exportable($result['data']);
            42 45 if (isset($pages[1]) && $pages[1] == 'count') {
            43 46 return Factory::response([
            44 'adminqueue:count' => $count
            47 'adminqueue:count' => count($activities)
            • Mark Harding
              Mark Harding @markeharding · 3 weeks ago
              Owner

              This will only ever show 12 though?

            • Ben Hayward
              Ben Hayward @benhayward.ben · 3 weeks ago
              Developer

              @markeharding I see what you mean. What do you prefer, taking the limit off the request on the front-end, finding a way to get the query to return the count correctly, or get rid of misindexed posts via script?

            • Please register or sign in to reply
          • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 3 weeks ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben closed 1 hour ago

            closed

          Please register or sign in to reply
          0 Assignees
          None
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Requires Changes Squad::Yellow
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Emiliano Balbuena
          user avatar
          Martin Santangelo
          user avatar
          Marcelo Rivera
          user avatar
          Guy Thouret
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Olivia Madrid
          Reference: minds/engine!381