[OpenVPMS Developers] [JIRA] (ARCH-54) PartyRules.getFaxNumber() missing space after area code.
PartyRules.getFaxNumber() missing space after area code. --------------------------------------------------------
Key: ARCH-54 URL: https://openvpms.atlassian.net/browse/ARCH-54 Project: Archetypes Issue Type: Improvement Affects Versions: 1.5 Reporter: Tim Anderson Assignee: Tim Anderson Priority: Trivial
PartyRules.getFaxNumber() is formatting fax numbers as {noformat} return "(" + areaCode + ")" + faxNumber; {noformat} There should be space after ")" to be consistent with telephone number formatting.
-- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://openvpms.atlassian.net/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf
Re: [OpenVPMS Developers] [JIRA] (ARCH-54) ...
I was looking at the fix that is needed here. The simple fix is easy, but in a broader context why does OpenVpms utilize a seperate archetype for fax numbers, the mobile archetype has been depreciated in favour of using a PURPOSE for mobiles.
Why not depreciate contact.fax in favour of adding a purpose to contact.phone enabling a phone to have a purpose as a fax.
My reasons.
1. Many people who still use fax's use it on a shared line, even Telstra still is pushing the faxstream network over a 2nd line (ie the fax uses a shared line with the phone, and just gives a different ring that fax machines can detect and answer selectively)
2. A fax is a phone number there is no difference.
3. It is far easier to add 1 number with 4 purposes and manage that data than to manage seperate contact archetypes
4. Existing formating code for phone number would apply to fax's both now and in future changes.
In the current scope, a customer could potentially have a mobile for work and home, we are allowed to assign multiple purpose's to a contact.phone, however....partyRules.GetContact function only allows for 1 defined purpose to be searchable. This means that utilizing a contact.phone with purpose's defines as FAX AND BILLING , MAY not be easily returnable when you consider there is also the possibility of having a number with BILLING as a purpose. This could be corrected by adding seperate purpose's for FAX-Billing, FAX-other etc etc.
I noticed that the only time this seems to be used in current code is in Ordermapperimpl.java where a search for any purpose defined as BILLING is conducted in the function
Re: [OpenVPMS Developers] [JIRA] (ARCH-54) ...
All valid points. I can't see any technical reason to retain it.
However:
If you feel strongly about it, take it up on the users forum. Also feel free to submit a patch :)
-Tim
Re: [OpenVPMS Developers] [JIRA] (ARCH-54) ...
Small hitch when I was working on the patch everything else seems fine. I almost swore when i saw that you'd used a the archetype fax to test the Loader in the etl.
However, the hitch that I can see is, that to retrofit and upgrade prior installations would mean all the fax archetypes would need to have conctactpurpose's named FAX and then have the archetype changed to contact.phone
The problem from my point of view is that we cant add purpose's in the update process because we use SQL to update the data base and cant hashmap.
Re: [OpenVPMS Developers] [JIRA] (ARCH-54) ...
You can do all of the migration in SQL.
The steps are as follows:
1. insert a lookup.contactPurpose with code FAX to the lookups table
There are examples of lookup creation in the migration scripts in openvpms-release/src/update/db/migrate-1.2-to-1.3.sql, amongst others
2. insert a relationship to contact_classifications between the above lookup and each contact.faxNumber
3. migrate the contact.faxNumber contacts to contact.phoneNumber
For an example of migrating one contact archetype to another, take a look at the migrate-1.3-to-1.4.sql in openvpms-release/src/update/db. Here, the contact.mobileNumber is migrated to contact.phoneNumber.
-Tim
Re: [OpenVPMS Developers] [JIRA] (ARCH-54) ...
Thanks Tim
I got the lookup insertion ok and I saw how to migrate the contact. archetypes, I will take a look this weekend at the contact_classifications relationship sql insertion.
Cheers mate, other than that I think I have a patch ready, noone seemed interested in commenting in the forums, maybe because its a framework change and doesnt really relate to frontend improvements