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 CiviEvent (Moderator: Yashodha Chaku) »
  • Can't cancel registration with price set
Pages: [1]

Author Topic: Can't cancel registration with price set  (Read 3558 times)

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Can't cancel registration with price set
March 10, 2010, 11:22:51 am
I reproduced the behavior on the demo site.  Created this participant record and then tried to change the status to cancelled:

http://drupal.demo.civicrm.org/civicrm/contact/view/participant?reset=1&id=56&cid=781&action=view&context=participant&selectedChild=event

Got the error: "Please select at least one option from price set"

I'm not quite sure whether this is a bug or the desired behavior. 

Basically, I need to move someone who bought a ticket online to a different night (event).  I've seen the discussions about making the relationship between contributions and registrations/memberships more flexible, but I thought I could just manually mark the original registration as cancelled (so it wasn't counted against capacity) and create a $0  registration for the new event.  The contribution would stay on the books, and the participant count would be correct for each event.  (The fact that the contribution would be assigned to the wrong event isn't an issue for me in this case.)

Is there something I'm not getting?

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Can't cancel registration with price set
March 18, 2010, 01:54:58 pm
Bump.

Seriously, this is a bug, right?  Or is there some reason that I don't get why you shouldn't be able to change participant status from the admin interface?

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: Can't cancel registration with price set
April 02, 2010, 07:46:46 am
"Please select at least one option from price set."

Yes, we see something similar...  We're seeing it on a CiviCRM 3.13 / Drupal 6.16 site when we attempt to edit an existing event registration to change the "Participant Status".  I did a quick search on Jira and did not find an open ticket... I could easily have missed the ticket... if it exists.

[Note to self: az.org]

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Can't cancel registration with price set
April 02, 2010, 01:14:30 pm
OK - I have a customer reporting this. Bug is replicable on their site but  I haven't investigated it yet

Cust site 3.1.3 + Joomla
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Can't cancel registration with price set
April 02, 2010, 02:16:41 pm
Code: [Select]
OK - so I know what the fix is in theory

line 442 in eventfees.php  is

[code]          CRM_Event_Form_Registration_Register::buildAmount( $form, true, $form->_discountId );

So, it needs to be (not real code just an approximation)

if action = update{
Code: [Select]
          CRM_Event_Form_Registration_Register::buildAmount( $form, false, $form->_discountId );}else{
CRM_Event_Form_Registration_Register::buildAmount( $form, true, $form->_discountId );[/code]
}

So, I just need to figure out whether that function knows the form action
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Can't cancel registration with price set
April 02, 2010, 02:37:58 pm
Hmm - I tried this & it white screened & then the kids came home so will try again in a bit

            require once 'CRM/Core/Action.php';
            if( $form->_action != CRM_Core_Action::UPDATE ){
              CRM_Event_Form_Registration_Register::buildAmount( $form, true, $form->_discountId );
            }else{
              CRM_Event_Form_Registration_Register::buildAmount( $form, false, $form->_discountId );             
            }
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Can't cancel registration with price set
April 03, 2010, 03:56:25 am
IGNORE THAT

Index: CRM/Price/BAO/Set.php
===================================================================
--- CRM/Price/BAO/Set.php   (revision 26715)
+++ CRM/Price/BAO/Set.php   (working copy)
@@ -464,7 +464,13 @@
                 switch ( $entityTable ) {
                 case 'civicrm_event':
                     $entity   = 'participant';
-                    $entityId = $form->_participantId;
+
+                    if ($form->_participantId){
+                        $entityId = $form->_participantId;                 
+                    }else{
+                        $entityId = $form->_id;                       
+                    }
+
                     break;
                     
                 case 'civicrm_contribution_page':
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Can't cancel registration with price set
April 03, 2010, 04:05:23 am
Issue here now

http://issues.civicrm.org/jira/browse/CRM-6052
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Can't cancel registration with price set
April 07, 2010, 02:03:24 am
for update mode, currently amount section is frozen for price set and we are not building price set form.
therefore we should not validate it.

thanks

kiran  
« Last Edit: April 07, 2010, 07:24:34 am by Kiran Jagtap »
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Can't cancel registration with price set

This forum was archived on 2017-11-26.