Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activty Import not working after 5.10.4 upgrade #23

Open
michael-chaplin-gmcvo opened this issue Feb 27, 2019 · 17 comments
Open

Activty Import not working after 5.10.4 upgrade #23

michael-chaplin-gmcvo opened this issue Feb 27, 2019 · 17 comments

Comments

@michael-chaplin-gmcvo
Copy link

Tried a couple of different CSV imports for activities eg

Date,Activity Type ID,Subject,Appt type,Source
20190319 16:30,1,test,Meeting,13361

Get an error:
Invalid value for field (activity_type_id) => 1

or whatever Activity Type ID was specified.

@michael-chaplin-gmcvo
Copy link
Author

Possibly going wrong in the validateField function? That gets an options array for activities eg Meeting => 'Meeting' etc and tries to match the activity_type_id (an integer) against it..and fails.

@eileenmcnaughton
Copy link
Owner

What version were you on before upgrading? I can't think of any recent relevant changes

@michael-chaplin-gmcvo
Copy link
Author

michael-chaplin-gmcvo commented Feb 28, 2019

4.6.38

I also can't find 'Activity name' or 'Activity label' in the 'matching civicrm field' drop down. These would maybe provide a workaround to the Activity type ID?

@michael-chaplin-gmcvo
Copy link
Author

michael-chaplin-gmcvo commented Mar 15, 2019

Steps to reproduce on https://dmaster.demo.civicrm.org:

  1. Add the extension at https://dmaster.demo.civicrm.org/civicrm/admin/extensions?reset=1
  2. Create a csv file containing:
    Date,Activity Type ID,Subject,Appt type,Source
    20190319 16:30,1,test,Meeting,129
    (129 is an existing contact).
  3. Go to https://dmaster.demo.civicrm.org/civicrm/csvimporter/import - try to import the file. The first and only line gives an error in the downloaded error file:
    "Reason" Invalid value for field (activity_type_id) => 1

I also get an error on the site on going to https://dmaster.demo.civicrm.org/civicrm/csvimporter/import:

User deprecated function: Deprecated function CRM_Core_OptionGroup::getValue, use 
CRM_Core_PseudoConstant::getKey. Array ( [civi.tag] => deprecated ) in CRM_Core_Error_Log- 
>log() (line 69 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Error/Log.php).

@eileenmcnaughton
Copy link
Owner

Is this on the released version of the latest from master - I recently merged this which may change it - not sure in which direction

#24

There were no significant relevant changes in civicrm 5.10 - unless you were upgrading rom a much older version

@michael-chaplin-gmcvo
Copy link
Author

It was on 5.13.alpha1

@eileenmcnaughton
Copy link
Owner

now you've confused me - 5.13.alpha1 is current master - you didn't upgrade from 5.13.alpha1 to 5.10 surely.

Ah I meant master of this extension not master of core

@michael-chaplin-gmcvo
Copy link
Author

I meant the version of dmaster demo (5.13.alpha1) where you can reproduce the issue using v1.3 of this extension.

@michael-chaplin-gmcvo
Copy link
Author

Hi Were you able to reproduce the issue on dmaster demo?

@eileenmcnaughton
Copy link
Owner

@mikantchap did you see the above fix? Are you able to see if it works for you?

@michael-chaplin-gmcvo
Copy link
Author

@eileenmcnaughton what version of this extension has those changes? Is it 1.4? ie https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport/releases/tag/1.4

@eileenmcnaughton
Copy link
Owner

@mikantchap it was in master - I just dropped 1.5 so you can try the latest merged code

@michael-chaplin-gmcvo
Copy link
Author

@eileenmcnaughton

I am still getting errors on dmaster demo - please tell me if I doing something wrong?

Version 1.5
CiviCRM = 5.14.alpha1

Create a csv file containing:
Date,Activity Type ID,Subject,Appt type,Source
20190319 16:30,1,test,Meeting,129

(129 is an existing contact).

Go to https://dmaster.demo.civicrm.org/civicrm/csvimporter/import

Match import as per screenshot:
image

The one line is skipped because you get errors:

Reason | Activity Date | Activity Type ID | Subject | - do not import - | Activity Source Contact

Invalid value for field (activity_type_id) => 1 | 20190319 16:30 | 1 | test | Meeting | 129

@michael-chaplin-gmcvo
Copy link
Author

Hi @eileenmcnaughton

Any more thoughts on this?

Thanks Mike

@michael-chaplin-gmcvo
Copy link
Author

michael-chaplin-gmcvo commented Jun 19, 2019

@eileenmcnaughton
If you change the contents of the CSV file to:

Date,Activity Type ID,Subject,Appt type,Source
20190319 16:30,Meeting,test,Meeting,129

ie change the 'Activity Type ID' field content to the activity type name, then it imports OK. But this is just changing the data to workaround the bug. I doubt I would be able to persuade the end user to do this.

@eileenmcnaughton
Copy link
Owner

We've had this discussion about the core import too (there were people going to write some unit tests but it stalled there)

@mikantchap
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants