Opened 4 years ago
Closed 4 years ago
#1486199 closed Bugs (fixed)
bugs in addressbook copy contact function
| Reported by: | JohnDoh | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.3.1 |
| Component: | Addressbook | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: |
Description
There appear to be 2 bugs in program/steps/addressbook/copy.inc. The contact copy function does not appear to be enabled in the basic UI at the moment but I would like to use this function as part of a plugin and so have attempted to debug the code.
Source/target check fails when using the default address book, I think this is just a data typing issue, using !== rather then != appears to fix it.
As I understand it the plugin hook documentation says that only one record will be passed when create_contact but when copying multiple contacts a recordset is passed. Splitting the contact ids and processing 1 at a time fixes this.
I attach a simple patch to fix these issues but there may be a better way to do it.
Attachments (1)
Change History (2)
Changed 4 years ago by JohnDoh
comment:1 Changed 4 years ago by alec
- Milestone changed from later to 0.3.1
- Resolution set to fixed
- Status changed from new to closed

Patch applied in [757d2bb9].