Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Dependency List
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 157
    • Issues 157
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 49
    • Merge Requests 49
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !210

Closed
Opened 1 week ago by Olivia Madrid@omadrid
  • Report abuse
Report abuse

WIP: epic/Referrals

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://gitlab.com/omadrid/engine.git epic/Referrals
git checkout -b omadrid/engine-epic/Referrals FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff omadrid/engine-epic/Referrals

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge omadrid:epic/Referrals into master
  • Email patches
  • Plain diff
Pipeline #68411452 failed for 904b4e84 on omadrid:epic/Referrals
      Requires 2 more approvals from Devs.
      Rami Albatal
      Rami Albatal
      Brian Hatchet
      Brian Hatchet
      Marcelo Rivera
      Marcelo Rivera
      Emiliano Balbuena
      Emiliano Balbuena
      Ben Hayward
      Ben Hayward

      Closed by Olivia Madrid 16 minutes ago

      The changes were not merged into master

      • Discussion 10
      • Commits 5
      • Pipelines 3
      • Changes 17
      6/10 discussions resolved
      • Loading...
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Last updated by Olivia Madrid 1 week ago
        Core/Rewards/Join.php
        181 182 ->setEntityType('user')
        182 183 ->setAction('referral')
        183 184 ->push();
        185
        186
        187 $referral = new Referral();
        • Mark Harding
          Mark Harding @markeharding · 1 week ago
          Owner

          Can we make this a delegate? ie. -> Core/Rewards/Join/Delegates/ReferralDelegate

        • Olivia Madrid @omadrid changed this line in version 2 of the diff 1 week ago

          changed this line in version 2 of the diff

        Please register or sign in to reply
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Last updated by Olivia Madrid 1 week ago
        Core/Referrals/Repository.php
        104 }
        105
        106 return $success;
        107 }
        108
        109 /**
        110 * Update a referral
        111 * @param Referral $referral
        112 * @return bool
        113 */
        114 public function update(Referral $referral)
        115 {
        116 // incoming $referral will have prospectGuid and joinTimestamp
        117
        118 // OJMTODO: check - shouldn't need IF EXISTS because referralValidator
        119 $template = "UPDATE referrals SET join_timestamp = ? WHERE prospect_guid = ?";
        • Mark Harding
          Mark Harding @markeharding · 1 week ago
          Owner

          should not be necessary as cassandra will upsert

        • Olivia Madrid @omadrid changed this line in version 2 of the diff 1 week ago

          changed this line in version 2 of the diff

        Please register or sign in to reply
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Last updated by Olivia Madrid 1 week ago
        Core/Referrals/Manager.php
        14
        15 public function __construct(
        16 $repository = null
        17 )
        18 {
        19 $this->repository = $repository ?: new Repository;
        20 }
        21
        22 /**
        23 * Create referral for registered prospect
        24 * @param ReferrerGuid $referrerGuid
        25 * @return bool
        26 */
        27 public function add($referral)
        28 {
        29 // OJMQ: what happens if the add() fails?
        • Mark Harding
          Mark Harding @markeharding · 1 week ago
          Owner

          I would return the value of repository add to solve

        • Olivia Madrid @omadrid changed this line in version 2 of the diff 1 week ago

          changed this line in version 2 of the diff

        Please register or sign in to reply
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Last updated by Olivia Madrid 1 week ago
        Core/Events/Hooks/Register.php
        36 38 $params['user']->save();
        37 39 $params['user']->subscribe($user->guid);
        38 40 }
        41
        42 // OJMQ: should I put a null value for joinTimestamp here?
        43 $referral = new Referral();
        44 $referral->setProspectGuid(Core\Session::getLoggedInUserGuid())
        • Mark Harding
          Mark Harding @markeharding · 1 week ago
          Owner

          Don't assume current session when outside of Controllers. $params['user'] is passed and a user entity, so we cant take from there

        • Olivia Madrid @omadrid changed this line in version 2 of the diff 1 week ago

          changed this line in version 2 of the diff

        Please register or sign in to reply
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Mark Harding
        Mark Harding @markeharding started a discussion on an old version of the diff 1 week ago
        Resolved by Olivia Madrid 1 week ago
      • Olivia Madrid @omadrid added 22 commits 1 week ago

        added 22 commits

        • 9f11fc4c...01d29bd9 - 18 commits from branch minds:master
        • 30f1c3e1 - WIP: Referrals console
        • f0233165 - WIP: Referrals console - update repository getList to accommodate incoming referral model
        • fc910d6b - WIP: Referrals - make changes based on Mark feedback
        • 42c7a29c - WIP: Referrals

        Compare with previous version

        Toggle commit list
      • Olivia Madrid @omadrid added 32 commits 3 days ago

        added 32 commits

        • 42c7a29c...a7925db0 - 27 commits from branch minds:master
        • 96336f68 - WIP: Referrals console
        • 627d5c1c - WIP: Referrals console - update repository getList to accommodate incoming referral model
        • 62241026 - WIP: Referrals - make changes based on Mark feedback
        • a8385534 - WIP: Referrals
        • 904b4e84 - WIP: Referrals console - accommodate infinite scrolling

        Compare with previous version

        Toggle commit list
      • Mark Harding @markeharding added MR::Awaiting Review label 6 hours ago

        added MR::Awaiting Review label

      • Olivia Madrid @omadrid closed 16 minutes ago

        closed

      • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
      Please register or sign in to reply
      Assignee
      None
      Assign to
      None
      Milestone
      None
      Assign milestone
      None
      Time tracking
      No estimate or time spent
      1
      Labels
      MR::Awaiting Review
      Assign labels
      • View project labels
      Lock merge request
      Unlocked
      8
      8 participants
      user avatar
      Rami Albatal
      user avatar
      Brian Hatchet
      user avatar
      Marcelo Rivera
      user avatar
      Emiliano Balbuena
      user avatar
      Ben Hayward
      user avatar
      Mark Harding
      user avatar
      Martin Santangelo
      Reference: minds/engine!210