Closed gromm closed 11 years ago
Gah!
Nevermind, my "fix" doesn't fix anything, it just breaks it. Field 9 is actually the fields to select, as in the SQL query "SELECT did, id FROM cc_did WHERE something='foo';"
The appropriate way to fix this is to add the text "ORDER BY did" to the end of field 8, which originally says "cc_did". I expect that this is part of the "custom SQL" variable for $HD_Form, which probably originally creates an SQL query like "SELECT did, id FROM cc_did" - adding the "ORDER BY did" text to the end of the table to select data from results in a valid SQL query, but I'm worried that this is too much of an ugly hack, and may break functionality elsewhere.
As we released V2, please reopen the ticket if the issue remain.
This issue still remains. I have version 2.0.16 and the DIDs do not sort by DID. Also when importing DIDs in CSV file, the additional fields do not work and I am unable to change the billing type. I have to do this manually at this time for hundreds of DIDs.
How can this be fixed?
This issue is more of an interface bug than anything.
In Inbound DID->Destination->Add Destination, when our DID database contains hundreds of DIDs, it is far more useful to sort DIDs by the DID than it is to sort by DID, then the DID's database ID (mostly chronological order when entering them into the DB). The reason for this is that typing in the entire 10+ digit DID to find it in the list can be tremendously laborious, especially when it has to be re-done several times because the browser timeout for doing so is too short. Typing the first 7 numbers gets the user to the general area in the list where they can find the rest of the DID.
The fix is easy. In /a2billing/admin/Public/form_data/FG_var_did_destination.inc, find the code block starting with:
$HD_Form -> AddEditElement (gettext("DID")
(Near line number 135 of this file) Then change the "order by" field from "did, id" to "did". In the code in this particular place, the "order by" field is number 9, although I know for certain that the '$value' field is data for several different variables in $HD_Form, so this may change in the future.