Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21366

Issue with message after unlinking and unlinking an clearing templates from host

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 4.0.43rc1, 5.0.26rc1, 6.0.7rc1, 6.2.1rc1, 6.4.0alpha1
    • Frontend (F)

      Problem description: If a host has multiple templates linked to it, and then a user unlinks one of them and unlinks and clears another one in a single host update, then the message details that is returned to the user is grammatically incorrect:

      Templates "333" unlinked from hosts "test".
      Unlinked: Item "222" on "test".
      Templates "222" unlinked from hosts "test".
      

      1 - As You can see, both words "templates" and "hosts" in the message are used in plural even though there is just one host and we have a row for each unlinked template.
      2 - Identical messages are displayed for both unlinked templates, even though the actions that were performed are different. If actions would be the same (unlink for both templates) then both templates would be included into a single message. Maybe the same should be done when different actions ("unlink" and "unlink and clear") are performed for templates?

      Steps to reproduce:

      1. Create two templates
      2. Create a host
      3. Link both of these templates to this host
      4. Open host configuration in edit mode
      5. Unlink 1st template and unlink and clear second template
      6. Submit host configuration form
      7. Check message details

      Result:
      As shown in message above, words "templates" and "hosts" are in plural, even though each line contains records for a single template and a single host.
      Expected: if there is 1 template unlinked from one host the above words should be used as singular. Since the message is the same for both unlinked and unlinked and cleared templates, why not mention both of them in a single row?

            zabbix.dev Zabbix Development Team
            solonkins Sergejs Olonkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: