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 Import (Moderator: Yashodha Chaku) »
  • Preview Activity - Missing required field check for Subject - CiviCRM 2.1.4
Pages: [1]

Author Topic: Preview Activity - Missing required field check for Subject - CiviCRM 2.1.4  (Read 1949 times)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Preview Activity - Missing required field check for Subject - CiviCRM 2.1.4
December 25, 2008, 10:37:28 pm
Hello,

  I'm using CiviCRM 2.1.4 on Drupal 6.8 and i came across this problem while importing Activities.
Essentially during the Import Preview  "Preview (step 3 of 4)" it does not check for a missing
field "Subject".

  Here's the problem duplicated on the civicrm demo server

1 - Create a contact - http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&cid=112
2 - Add an activity  'Meeting' manually - please note "Subject" is a required field.
3 - Import an activity using the attached file.
4 - The Preview does not flag the error for missing subject and when the actual import is done it gives an
     error message


"Sorry. A non-recoverable error has occurred.
Not enough data to create activity object,
Return to home page."


The problem is in the code for checking the required field in the file

CRM/Activity/Import/Parser/Activity.php
in the function summary line number 156

function summary( &$values )

it checks for activityDateIndex - line 178

        if ( $index < 0 or $this->_activityDateIndex < 0 ) {
            $errorRequired = true;

but no check is done for subject index.

Thanks.

Yashesh Bhatia.



shashikant52004

  • Guest
Re: Preview Activity - Missing required field check for Subject - CiviCRM 2.1.4
December 26, 2008, 01:13:07 am
Hi all,
   I checked the problem on my local site (Drupal 6.8 and civiCRM 2.1.4) and resulted in the same error.
The error is due to no check for subject index in CRM/Activity/Import/Parser/Activity.php while creating summary and still checking for the subject in create() function of CRM/Activity/BAO/Activity.php - line number 233 .
   I have attached a patch for the problem, can you please check & review.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Preview Activity - Missing required field check for Subject - CiviCRM 2.1.4

This forum was archived on 2017-11-26.