Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • smartdebit smartdebit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • smartdebitsmartdebit
  • Issues
  • #3
Closed
Open
Issue created Jun 09, 2020 by capo@capoContributor

Doubled periods for new memberships

How to Reproduce

Doubled periods are set for new memberships when auto-renew used with the initial completed option. To reproduce it:

  • create a contribution page that allows registration for a given membership type,
  • ensure that the membership is set to auto-renew,
  • ensure that the Smart Debit payment processor is used in the contribution page,
  • enable the initial complete Smart Debit parameter (see Administer > CiviContribute > Smart Debit > General Setup),
  • register as a member using the contribution page.

Expected Result

The new membership should have the end_date set to the current date plus the period of the membership (e.g. 1 year).

Obtained Result

Instead, the new membership is created with an end_date that doubles the expected period.

Fix

If my tests are correct, a relatively simple fix is possible by moving the lines of the pre hook that are triggered during the membership create, to a post hook. To facilitate the reproduction of the fix, I'll be sending a merge request with this issue.

Edited Jun 09, 2020 by capo
Assignee
Assign to
Time tracking