CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Civicrm reverting to Old Configured start and End Date of a membership Type
Pages: [1]

Author Topic: Civicrm reverting to Old Configured start and End Date of a membership Type  (Read 3443 times)

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Civicrm reverting to Old Configured start and End Date of a membership Type
August 17, 2013, 08:57:28 am
I find that the start and end date for a specific membership type had reverted to the old start and end date of that membership type. The new start date is April 1 and end date is March 31. Now i have quite a lot of the members displaying the old Start Date and End Date as Jan1 - Dec 31st. My major headache is how to batch update all the start and end date for all members and at thesame time assign proper Membership status as expired or current. (i have only Expired and Current Status).  Do i need cron job to do this or what is the process. Somebody help.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 17, 2013, 10:27:23 am
hi Adizo,

First - what version of CiviCRM are you running?  Your profile says "4", but the answer is a bit different depending on whether you're running 4.0 or 4.1+.

Assuming 4.1+, you should have a job to update Membership Status in your Scheduled Jobs menu.

You can batch update using "Batch Update via Profile", though this is limited to (I believe) 50 at a time.  Past that, you may want to edit your MySQL database directly.

Hope this helps!
Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 17, 2013, 04:03:57 pm
Thanks a lot JonGold. Am currently running version 4.0.5. If i batch update Membership Start Date and End Date, will this affect the Membership status?

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 20, 2013, 02:56:34 pm
Hi Adizo,

CiviCRM 4.0.5 has a cron job that will update membership statuses based on the start and end date of the membership.  Check out the Administer menu -> CiviMember -> Membership Status Types.  Make sure to view the types to see the rules - the summary page is a bit misleading.

If you have that cron job enabled and working, and you change the start and end dates, the membership status WILL be affected.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 20, 2013, 04:11:58 pm
Thank you so much JonGold. I think this is the major problem why the dates are not being updated:the cron job issue. Cron Job for 4.0 is a bit cumbersome. Is there an easy way to set up the cron job to update the membership statuses. Will really appreciate a hand here.

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 20, 2013, 05:09:46 pm
Hi JonGold,
As a follow up to your suggestion, i attemtpted the uRL method of updating membership status but i got the following error:
ERROR: You need to send a valid user name and password to execute this file.

Now the question is must the username and password be for a user who can log in to drupal(am using drupal). If it is, the username and password i passed to the line are correct and the User has permission to administer Civicrm but it still gave that error. Or could it be in the password because i the passsword is a combination of letters, numbers and special characters.Or what else could be wrong>
The sitekey is correct and every other thing. Below is the line i used

http://icobainternational.org/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?user=[the admin]&pass=userpassword&key=c87c629a8fedf798a893d0ec91ce2596

Any suggestions?
Thanks in advance

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 20, 2013, 05:25:14 pm
The problem was that in the line: http://icobainternational.org/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?user=username&pass=pasword&key=sitekey, i used user instead of name. the record was indeed updated but another set of problem came up. The script updated the Membership Status but did not assign the correct Membership Start and End date. It is still displaying the old dates for members.

So how can i update start and end date to reflect the new start and end date for all members using cron job?
« Last Edit: August 21, 2013, 01:38:54 pm by adizo »

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 21, 2013, 08:50:40 am
Hi adizo,

First - your last post contains a URL with the username and password to your site.  Please remove it immediately!

Second - you can't update the membership start/end dates via cron job.  There are three ways to change those dates (besides going one by one).  In increasing order of difficulty:

* Create a profile with the membership start/end dates.  Search for the profiles with the membership dates that need changing, select "Batch Update Via Profile".  Simple, but on CiviCRM 4.0.5, this will only fix 50 records at a time.
* Use SQL directly on the database.  This is discouraged, because you're going "around" CiviCRM, so your changes won't be reflected elsewhere (for instance, the change log will have no record that you changed anything).  However, if you're ONLY changing membership start/end dates, and you have a whole lot of them, this is the way to go.
* Write a script using the API to find and update the memberships in question.  This requires knowledge of both scripting and the API, but is the "preferred" approach.

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 21, 2013, 03:43:10 pm
Thanks a lot for the quick response. i have removed the details in the link.
I understand all the options.
Batch update through Profile seems the way to go but the problem is that in Civicrm 4.0 which i have installed, start and end date is not included as part of the Membership type when creating profile. When you select Membership as contact type, you can see status but not start and end date. OR am i doing something wrong?

Mysql Option
What Civicrm table actually holds the start and end date?

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 22, 2013, 02:17:56 pm
You're right, profiles won't work for this.  The fields you want are in the civicrm_membership table.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

adizo

  • I post occasionally
  • **
  • Posts: 70
  • Karma: -1
  • It doesn't take time. It takes truth!
  • CiviCRM version: 4
  • CMS version: Joomla
  • MySQL version: 3.6
  • PHP version: php5
Re: Civicrm reverting to Old Configured start and End Date of a membership Type
August 25, 2013, 04:30:20 pm
Thanks a lot JonGold. I whave resolved the dilemma. First i exported the members out to csv file and included the start and end dates. Then i updated the start and end date fields of the csv file with the new values and imported the file asking it to update the record not create a new one. That sorted out the   date issue. Then i used Civimember role sync to sync the current and expired status rules with the corresponding role permissions of the membership type. I then used  used cron job to update member status. It worked like magic. thanks a lot JonGold. Your tips pointed the way.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Civicrm reverting to Old Configured start and End Date of a membership Type

This forum was archived on 2017-11-26.