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 CiviContribute (Moderator: Donald Lobo) »
  • Price Set Detail report crashes if an item is disabled
Pages: [1]

Author Topic: Price Set Detail report crashes if an item is disabled  (Read 3061 times)

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
Price Set Detail report crashes if an item is disabled
August 05, 2013, 05:41:27 pm
CiviCRM 4.3.5 + Drupal 7.22
If one attempts to run a Price Set Detail custom search report on a price set (e.g., for an Event) in which one or more of the price set items have been disabled, CiviCRM throws an unspecified db error.

Now, a simple fix is to turn the item in the price set back on before you run the report, but for our use case, we periodically run reports while registration is open even if we've turned off items that are no longer available to new registrants. So we'd like to see *all* data, even though some items are disabled, without having to enable those items where they might be chosen by people who are registering while the item is enabled.

The attached patch fixes this issue. It modifies the Price Set Detail report to always return data for all items in the price set, whether or not they are currently enabled. To do this required adding a new argument to CRM_Price_BAO_Set::getSetDetail(), with a default value that preserves behavior for all existing calls to the function.

I'll post this patch here for anyone with a similar use case, and if the admins agree that the change should be rolled into CiviCRM, say so and I'll post an issue in JIRA.

Robert

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Price Set Detail report crashes if an item is disabled
November 04, 2014, 12:14:36 pm
Have you rolled this for CiviCRM 4.5.x? I tried reworking the patch to modify the new file names, and it applied successfully, but then when I ran the report the results were blank. I rolled the patch back.

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
Re: Price Set Detail report crashes if an item is disabled
November 08, 2014, 07:51:01 pm
Yes. There were some changes needed in CiviCRM 4.4.5; updated patch attached. We've been reapplying it successfully up to the current CiviCRM 4.5.2.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Price Set Detail report crashes if an item is disabled
November 10, 2014, 01:23:10 am
Quote
if the admins agree that the change should be rolled into CiviCRM, say so and I'll post an issue in JIRA.

Probably a better to do go about this is / to get "the admins" attention is to create the issue, and let them know that you are happy to do the work to get it in core, and then see what they say.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Price Set Detail report crashes if an item is disabled

This forum was archived on 2017-11-26.