Skip to content

NethVoice: make possible to copy a template model #7288

Description

@andrea-marchionni

NethVoice: make it possible to copy a template model

Description

Add the possibility to duplicate an existing template model in NethVoice.

Currently, when a new template model is needed with settings similar to an existing one, it must be created manually from scratch.

A Copy/Duplicate action would make it possible to use an existing template model as a starting point.

Expected behavior

From the template model list, the user should be able to:

  1. Select an existing template model.
  2. Click a Copy or Duplicate action.
  3. Create a new template model containing the same configuration as the original one.
  4. Assign a new name to the copied model before saving it.

The original template model must remain unchanged.

Benefit

This would simplify the creation of similar template models and reduce configuration errors and duplicated manual work.

Activity

  1. converted this from a draft issue on Jan 29, 2025
  2. added
    nethvoice
    on Jan 29, 2025
  3. changed the title [-]NethVoice: make possible to copy a tempalte model[/-] [+]NethVoice: make possible to copy a template model[/+] on Jan 29, 2025
  4. changed the issue type fromtoon Oct 6, 2026
  5. moved this from Todo to In Progress in NethVoiceon Nov 10, 2026
  6. tonyco97 commented on Nov 20, 2026

    @tonyco97

    Test

    PR: nethesis/ns8-nethvoice#1201 (draft, testing image ghcr.io/nethesis/nethvoice:pr-1201.*)

    Setup:

    • NethVoice instance updated to the latest PR testing image, wizard already completed.
    • At least two physical phones of the same vendor assigned to users, and if possible one phone of another vendor.
    • The new interface is at https://<voice host>/nethvoice/, page Physical phones > "Models".

    Test Case 1 - Duplicate a model

    • Open the row menu of a model in use > "Duplicate": the drawer "Duplicate model" opens with "Name" set to <model name> copy and "Base model" set to the original model.
    • Empty the name and press "Duplicate": "Enter a name" is shown.
    • Enter the name of another model, also with different upper and lower case: "A model with this name already exists" is shown and nothing is created.
    • Restore the proposed name and press "Duplicate": "Model duplicated" with "Model has been created."; the list stays open and shows the copy with type "Custom" and 0 phones.
    • Duplicate the same model again: the proposed name is <model name> copy 2.
    • Duplicate a custom model and a default model: both work the same way.

    Test Case 2 - The copy has the same settings and the original does not change

    • Open the original model ("Edit") and set some values in every section: "Soft keys", "Line keys", "Display and ringtone" (also "Upload background image"), "Preferences" (also "Upload firmware"), "LDAP phonebook" and "Network"; "Save": "Model saved".
    • Duplicate it, then open the copy: every section shows the same values as the original, uploaded files included.
    • In the copy change a line key label and the ringtone, then "Save": "Model saved".
    • Open the original again: its line key label and ringtone are unchanged.
    • Change a value in the copy and go back to "Models" without saving: "Unsaved changes" asks before leaving ("Keep editing" / "Discard changes").

    Test Case 3 - Use and delete the copy

    • Go to "Phones", "Edit" a phone of the same vendor: the copy is offered in "Model"; choose it and "Save": "Phone updated" and the list shows the copy as model.
    • "Edit" a phone of another vendor: the copy is not offered in "Model".
    • Row menu of the phone > "Run provisioning": after the phone downloads the configuration it shows the line key label and the ringtone set in the copy.
    • "Models": the copy now counts 1 phone and its row menu shows "Delete (model in use)" disabled.
    • Put the phone back on the original model, then row menu of the copy > "Delete": "Model will be permanently deleted."; confirm: "Model deleted" and the copy disappears from the list.
    • Default models have "Reset to original settings" instead of "Delete".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

nethvoice

Projects

  • Status
    In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions