Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15951

Membership status incorrectly calculated under some dates

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.6
    • Fix Version/s: 4.6.1
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      User and Admin Doc

      Description

      Pete has identified a set of dates that fail to generate a membership status. Not sure if this is new to the 5-year fix or this is finally a way to replicate the mysterious intermittant bug. Test that demonstrates is

      /**

      • Test that correct end date is calculated for fixed multi year memberships and start date is not changed.
        *
      • In this set our start date is after the start day and after the rollover day so we do get an extra year
      • and we end one day before the rollover day. Start day is 1 April so we end on 31 March
      • and we add on 5 years we are after the rollover day - so we calculate 31 March 2020
        */
        public function testFixedMultiYearDateSetFourEmptyEndDate() { unset($this->_params['start_date'], $this->_params['is_override'], $this->_params['end_date']); $this->callAPISuccess('membership_type', 'create', array( 'id' => $this->_membershipTypeID2, 'duration_interval' => 5, // Ie. 1 . 'fixed_period_start_day' => '0401', // Ie 1 July 'fixed_period_rollover_day' => '0701', )); $this->_params['membership_type_id'] = $this->_membershipTypeID2; $dates = array( 'start_date' => '03-Apr 2015', 'join_date' => '03-Apr 2015', ); $result = $this->callAPISuccess($this->_entity, 'create', array_merge($this->_params, $dates)); $result = $this->callAPISuccess($this->_entity, 'getsingle', array('id' => $result['id'])); $this->assertEquals('2015-04-03', $result['join_date']); $this->assertEquals('2015-04-03', $result['start_date']); $this->assertEquals('2020-03-31', $result['end_date']); }

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: