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) »
  • Price Sets: data loss on edit/save
Pages: [1]

Author Topic: Price Sets: data loss on edit/save  (Read 1680 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Price Sets: data loss on edit/save
August 04, 2008, 09:05:43 am
Ran into an issue with how price sets are handled on 2.0. There's some restructuring on 2.1, which appears to fix things, but I want to sketch out the scenario to see if anyone has a 2.0 fix and to make sure it's definitely remedied in 2.1.

Here's the scenario with bad results:
Event is created with multiple fee fields in a price set.
Register user for the event, choose from multiple fees, record payment.
Edit event record for user:
> First thing I notice is that the event fees don't parse on the edit screen. Some show up, but not all. Note that because I used the "record payment" option the event fees are not editable, only visible.
> Resave the record. In theory, only the event or custom field options should be saved. The fees should be uneditable (because record payment was optioned).
> Result: The fee level field is overwritten. Because the data didn't parse, whatever options were originally selected are now lost.

I've replicated on the 2.0 sandbox (John Doe record).

One thing I've noticed is that apparently the civicrm_line_item table, which relates the event, price set, and contribution, is only used for frontend forms -- not for event registrations created through the admin. That has a couple ramifications: 1) it's not possible to build queries to get line item costs for backend registrations; 2) more importantly, it means the event_level field (the one data compromised) is the only basis for determining what options have been selected for the user.

I'm at a bit of a loss as to how to best deal with this. I guess the first thing is to deal with stopping the data loss. Where and how is the event_level field supposed to be parsed for display in the reg form?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Price Sets: data loss on edit/save
August 04, 2008, 11:23:54 am

can you test this on our 2.1 sandbox machine. i noticed this and fixed it in the places where it was missing.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Price Sets: data loss on edit/save
August 04, 2008, 01:50:40 pm
I was not able to replicate on 2.1, so it appears to be fixed.

I couldn't find an issue to see if a backport was easy. Do you recall offhand what files were impacted? I'm mostly concerned to eliminate the data over-write on edit>save as I don't want users inadvertently losing data.

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Price Sets: data loss on edit/save
August 06, 2008, 12:40:50 am
Hi,

Don't know if it's on the same issue than "same price not possible on the same item in priceset" , but for what I've seen, things have been reshuffled quite a bit around (at least enough so I couldn't backport that feature).

Let you know if I see something.

What is the purpose of" recording payment" ? Where is it seen ?
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Price Sets: data loss on edit/save
August 06, 2008, 01:05:47 pm
Quote from: xavier on August 06, 2008, 12:40:50 am
What is the purpose of" recording payment" ? Where is it seen ?

When 'Record Payment' is checked - a contribution record is automatically created / linked to the event registration (civicrm_participant) record.
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Price Sets: data loss on edit/save
August 07, 2008, 02:34:15 am
Got it, that's because the CiviContribution module wasn't enabled that I didn't see it.

As for the backport, has Brian found a way ? Got about the same issue, and my custom export by "product" is getting weird...

Thanks

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Price Sets: data loss on edit/save

This forum was archived on 2017-11-26.