Add coverage fields to the Change Address wizard
Before start the provisioning process, when is a change of address, we can cancel the order if we have the needed information about the coverage in the new place.
For more information review the card: https://trello.com/c/7EvicZ1j
Design
Coverage fields
We have 4 new fields:
-
adsl_coverage
- Selector -
mm_fiber_coverage
- Selector -
vdf_fiber_coverage
- Selector
The values of these fields are defined in OTRS. We need these values in Tryton.
I propose to define these values in otrs_somconnexio
and use them from this module and from the eticom
module.
To save the values selected in the wizard we need new models or modify the EticomContract model.
I propose to create a new model with the coverage order information. This new model can be:
classDiagram
CoverageAvailability "1" -- "1" EticomContract
CoverageAvailability : String adsl
CoverageAvailability : String vdf_fibre
CoverageAvailability : String mm_fibre
CoverageAvailability : int EticomContract
EticomContract : int CoverageAvailability
EticomContract : bool changeAddressSameOwner
EticomContract : +adsl_coverage() String
EticomContract : +mm_fiber_coverage() String
EticomContract : +vdf_fiber_coverage() String
The change address process now is:
- Start wizard and fill it.
- The wizard creates and EticomContract with the address data.
- An agent validates the EticomContract.
- The EticomContract validation generates a ticket in OTRS to start the provision of the new place.
And after these changes:
- Start the wizard and fill it.
- The wizard creates an EticomContract and a related CoverageInfo model with the coverage information filled in the wizard.
- An agent validates the EticomContract or cancel it if has low coverage.
- If it's validated, the process uses the coverage data to send more info to the OTRS ticket and start the provisioning process. If it was canceled, the process ends.
DynamicField_canviUibcacioMateixTitular
Field We also create a new field in the EticomContract model. A boolean that checks if is only an address change or if it's an address and owner change. This field is false
by default.
When we are creating a ticket from an EticomContract, if this field is true
we fill the dynamic field and send it to OTRS. If the field is false
we don't add this dynamic field to the request.
Coverage fields
These fields get the selector value from the otrs_somconnexio
library. I propose to create models to manage the coverage values of OTRS.
Creating the next models:
- ADSLCoverage
- MMFibreCoverage
- VdfFibreCoverage
all these methods implement a method get_selector_values()
as a class method to fill the fields in the wizard and the possible values of the new model CoverageInfo fields.
classDiagram
Coverage <-- ADSLCoverage
Coverage <-- MMFibreCoverage
Coverage <-- VdfFibreLCoverage
ADSLCoverage : +get_selector_values() List
MMFibreCoverage : +get_selector_values() List
VdfFibreLCoverage : +get_selector_values() List