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 »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership Status Names -- hard coded causing issues.
Pages: [1]

Author Topic: Membership Status Names -- hard coded causing issues.  (Read 950 times)

Conga3.com

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
  • Should be golfing...
    • Conga3
Membership Status Names -- hard coded causing issues.
July 18, 2010, 11:08:54 am
I don't think CiviCRM should be hard coding ANY special behaviors in the code based on status names as long as names and rules can be customized by admins.

For example,

I just had to hack my UpdateMembershipRecord.php file because for some crazy reason, a new status I added called "Suspended" wasn't properly updating.  I wanted this status to be after a grace period status and before the expired status, so it was going to be changing expired memberships to suspended.

In the code I found : (line 164)
Code: [Select]
           //update membership records where status is NOT - Pending OR Cancelled.
            //as well as membership is not override.
            //skipping Expired membership records -> reduced extra processing( kiran )
            if ( !$dao->is_override &&
                 !in_array( $dao->status_id, array( array_search( 'Pending', $allStatus ),
                                                    array_search( 'Cancelled', $allStatus ),
                                                    array_search( 'Expired', $allStatus ) ) ) ) {

My new status wasn't being used because "Expired" status membership weren't being processed.  This is bad logic in an attempt to save processing...

Looking around in the file there are behaviors based on status names "Deceased", "Pending", "Cancelled", and "Expired"

I'm not sure it makes sense to both allow for custom status names/rules AND hard code behavior based on default names.

It might add some functionality for the bulk of CiviCRM installs...but if an admin starts to customize the status names, they'll start experiencing non-typical behaviors.   And like in my case...cause much frustration.

catherine

  • Guest
Re: Membership Status Names -- hard coded causing issues.
September 18, 2010, 01:27:37 am
Based from my experienced in registering and also in updating my membership, there are times that my registered name can't activate my account which is already approved by the administrator. This will cause me to frustration. It also leads me to leave the site and finding another one.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership Status Names -- hard coded causing issues.

This forum was archived on 2017-11-26.