Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,376
    • Issues 1,376
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #2791

Closed
Open
Created Aug 27, 2021 by Rich@artfulrobotDeveloper

Membership start date ignores trxn_date/receive_date gets recalculated to today

Overview

https://chat.civicrm.org/civicrm/pl/5bwnarinz7y73nwdjri9oidyno

Reproduction steps

Do an Order.create call which includes:

  • receive_date: 2020-01-01
  • entity params in the line item contain 2020-01-01 for start_date.

This works, a pending membership is created with the start date of 2020-01-01 but then the subsequent Payment.create which includes the same historical trxn_date updates the membership's start_date to today.

Expected behaviour

Membership start date should take the date of the transaction. (I belive this was the case up to and including 5.39 but not in 5.40)

Environment information

buildkit d7 Civi 5.40

Comments

This was picked up by the test assertion at https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L915 After the work is done in https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L1913 and specifically the Payment.create at https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L1998

These tests have been completely rewritten. See extensions/gocardless#123 (closed)

Edited Sep 02, 2021 by Rich
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking