[freeside-users] 4.1 Bug report: "Change xyz" in selfservice resets cust_contact.selfservice_access to NULL
Erreu Gedmon
eg at keyway.net
Thu Dec 1 12:18:13 PST 2016
4.1 Bug report: "Change xyz" in selfservice resets cust_contact.selfservice_access to NULL
https://github.com/Erreu/Freeside/issues/3
Description: Making unrelated account changes in selfservice resets cust_contact.selfservice_access and cust_contact.classnum to NULL when contact.last and contact.first match cust_main.last and cust_main.first
Expected: cust_contact.selfservice_access and cust_contact.classnum should only change when their values are modified by the user
Reproduce: Login to selfservice, choose one of change billing address, service address, payment information, choose "Apply changes".
Affects: Freeside 4.1 & 4.2~git-1
Cause: Bug #6 https://github.com/Erreu/Freeside/issues/6 in cust_main::replace is being exposed by Account::edit_info passing $cust_main->invoicing_list back to cust_main::replace (unnecessarily)
Workaround: Ensure that contact.last and contact.first do not match cust_main.last and cust_main.first (even a single character difference is sufficient, for example a comma after the last name)
Notes:
MyAccount::edit_info populates @invoicing_list with the preexisting values if the enduser hasn't made any changes to it. Since INVOICING_LIST_ARYREF is both optional and deprecated, this appears to be unnecessary overhead.
Recommended fix: If the user has not modified $invoicing_list, do not pass it to cust_main::replace
Pull request: https://github.com/freeside/Freeside/pull/59
Commit: https://github.com/Erreu/Freeside/commit/b33c2d972b2c24781cf90efa2be01e6452798b5b
--
Erreu Gedmon
--
"You see persons and things not as they are but as you are."
-- Anthony De Mello
More information about the freeside-users
mailing list