<feed xmlns='http://www.w3.org/2005/Atom'>
<title>contact/includes, branch master</title>
<subtitle>Bitweaver contact package repository
</subtitle>
<id>https://git.rdm1.uk/contact/.git/atom?h=master</id>
<link rel='self' href='https://git.rdm1.uk/contact/.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/'/>
<updated>2026-06-19T13:05:07Z</updated>
<entry>
<title>Map contact persons to registered users via contact.role_id</title>
<updated>2026-06-19T13:05:07Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-19T13:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=5d3e672dd7f35c348a98fd149c02c5c9d79cb520'/>
<id>urn:sha1:5d3e672dd7f35c348a98fd149c02c5c9d79cb520</id>
<content type='text'>
contact.role_id stores the user_id of the linked registered user (NULL = no
account). load() joins users_users on role_id to expose linked_user_login and
linked_user_name. verify() accepts user_id from the edit form and writes it to
contact_store['role_id']. getList() now filters by user_id key (was role_id).
Edit form shows the user_id field to admins with current login shown inline;
display template shows the linked user when set.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Fix P01 name xref being wiped when saving type checkboxes</title>
<updated>2026-06-18T20:25:38Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-18T20:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=53bb19704b1e99245b755caf2d573a4406066902'/>
<id>urn:sha1:53bb19704b1e99245b755caf2d573a4406066902</id>
<content type='text'>
The bulk DELETE of P*/B* xrefs was removing P01 (which carries the
pipe-encoded name) whenever contact_types were saved. P01 is implied
for all persons and never submitted as a checkbox, so it was never
re-inserted. Fix handles P01 separately — always delete/rewrite it
from pParamHash['name'] — and excludes it from the checkbox cycle.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Introduce ContactPerson and ContactBusiness subclasses</title>
<updated>2026-06-11T18:26:25Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-11T18:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=64aae1e41d9288a6d9709781af29b06fe6adb5ca'/>
<id>urn:sha1:64aae1e41d9288a6d9709781af29b06fe6adb5ca</id>
<content type='text'>
Splits the Contact class into ContactPerson (content_type_guid='contactperson')
and ContactBusiness (content_type_guid='contactbusiness'), each using 'contact'
as the shared package-level xref schema. Replaces the $isPerson/$00 xref hack
with proper class identity via instanceof.

- ContactPerson.php, ContactBusiness.php: new subclasses
- Contact.php: loadXrefTypeList() reads type tags directly from liberty_xref;
  getAvailableTypeItems() for edit form (schema-driven with pre-upgrade fallback);
  getDisplayUrl() now points to display_contact.php
- Type item codes: P01/P02 (person), B01-B04 (business, B01=Service new)
- list_people.php, list_businesses.php: separate list pages per type
- list_contacts.php: combined display-layer merge of both types
- 5.0.3.php: upgrade script migrating existing data to new content types and codes
- Templates: isPerson flag from instanceof; horizontal type checkboxes; list.tpl
  accepts $listTitle; menu adds People/Businesses entries

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>contact: fix null mUserId producing invalid SQL for anonymous users</title>
<updated>2026-06-06T21:06:57Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-06T21:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=109dc9aca9308fe2086c4a8d9c8ec2ac28e75848'/>
<id>urn:sha1:109dc9aca9308fe2086c4a8d9c8ec2ac28e75848</id>
<content type='text'>
Direct string concatenation of mUserId into JOIN conditions produces
'purm.user_id=' (no value) when mUserId is null for anonymous users,
giving Firebird -104 Token unknown. Cast to (int) with ?? 0 fallback.

Affects ContactType::setup() and Contact::loadAddressList().

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>contact: docblock tidy and remove dead Xref scaffolding</title>
<updated>2026-06-06T17:11:48Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-06T17:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=86a501258879b68e28636eb680d2320fc24819e6'/>
<id>urn:sha1:86a501258879b68e28636eb680d2320fc24819e6</id>
<content type='text'>
Add/update docblocks across Contact, ContactType, ImportContactCSV.
Fix @package articles typo in ContactType.
Delete ContactXref, ContactXrefType, and lookup_contact_xref_type_inc —
all three were unwired scaffolding with no callers.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>import: cull legacy importers; move data to storage/contact/</title>
<updated>2026-06-06T16:22:14Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-06T16:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=3270cd788cc6fb06f35aaf56f8c1d76b24cb609e'/>
<id>urn:sha1:3270cd788cc6fb06f35aaf56f8c1d76b24cb609e</id>
<content type='text'>
Remove one-off importers: Phx, Sage, Wande, old Contact/ContactOld
classes, load_contacts/phx/sage/wande scripts, schema_import_inc,
phx SQL, xmail files, mbox/mime email pipeline stubs.

Add CONTACT_IMPORT_PATH = STORAGE_PKG_PATH.'contact/' to bit_setup_inc.
Update load_contacts_csv.php to use CONTACT_IMPORT_PATH.

Email-to-contact pipeline (Mbox/mime/phail) retained as pending todo.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Contact::load(): replace loadXrefList() with loadXrefInfo()</title>
<updated>2026-06-06T14:38:20Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-06T14:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=cf124b2b5e5d7a7663c2dfafa970ca191216f143'/>
<id>urn:sha1:cf124b2b5e5d7a7663c2dfafa970ca191216f143</id>
<content type='text'>
loadXrefList() was removed from LibertyContent as part of the xref
migration to the LibertyXrefGroup path. Contact::load() already called
loadXrefInfo() but the stale loadXrefList() call remained, causing a
fatal error on load.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>contact: fix SCREF lookup to use xkey not data</title>
<updated>2026-06-04T08:10:24Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-04T08:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=0fbda8a14700801da06e2c253c12281fb1e5e1e8'/>
<id>urn:sha1:0fbda8a14700801da06e2c253c12281fb1e5e1e8</id>
<content type='text'>
Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>contact: add lookup_contact.php JSON autocomplete endpoint</title>
<updated>2026-06-03T21:08:00Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-06-03T21:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=6a8891a1dc72640909c3f5b2003f208dd2174bfc'/>
<id>urn:sha1:6a8891a1dc72640909c3f5b2003f208dd2174bfc</id>
<content type='text'>
Searches contacts by title or SCREF short name. Used by stock
edit_movement.tpl From field datalist.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add add_person/add_business flows; tidy contact view/edit for type</title>
<updated>2026-05-31T18:45:29Z</updated>
<author>
<name>Lester Caine</name>
<email>lester@lsces.co.uk</email>
</author>
<published>2026-05-31T18:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.rdm1.uk/contact/.git/commit/?id=a6d77d28625efe86fe16228cbfdce49d6a5bf6e2'/>
<id>urn:sha1:a6d77d28625efe86fe16228cbfdce49d6a5bf6e2</id>
<content type='text'>
- add_person.php + add_person.tpl: minimal form, auto-injects $00
- add_business.php + add_business.tpl: org name + $02+ type checkboxes
- menu_contact.tpl: replace generic edit link with Add Person / Add Business
- Contact.php: fix title overwrite (org no longer clobbers person name);
  fix null trim on organisation; fix $00 type xref stored correctly
- edit.php: isPerson flag; xref groups loaded; type list filtered $02+ for businesses
- edit.tpl: person/business field visibility; tabbed xref block at bottom of Details tab
- edit_type_header.tpl: value fixed to {$type.item}; $00/$01 filtered out
- display_contact.tpl: person/business field selection; note above addresses;
  no-addresses fallback removed; allow_edit=false on xref tabs
- display_type_header.tpl: heading Personal/Business Contact; $02+ types only
- contact_date_bar.tpl: remove Add crossref shortcut (now in edit tabs)
- view_xref_*_item.tpl: dates and edit actions gated on $xrefAllowEdit

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
