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

User macro uniqueness validation works incorrectly if macro changed its place in table during update

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.0.40rc1, 7.0.12rc1, 7.2.6rc1, 7.4.0beta1 (master)
    • Frontend (F)

      Problem description: in case if during host/template configuration update a user macro has changed its place in the table (for example macro {$M}, which was in 1st row of the macro table, ended up on the 2nd row) then the update fails with an error, that states that such macro already exists on this hots/template (even though it just changed place in table):

      Steps to reproduce:

      1. Create a host with the following user macros:
        1. Macro = {$M}
        2. Macro = {$M2}
      2. Open configuration of this host and switch to Macros tab
      3. Update the field "Macro" of both user macros in the following way:
        1. {$M} => {$2M}
        2. {$M2} => {$M}
      4. Try to save host configuration

      Result: Host configuration is not saved, same error as in the above screenshot is displayed, even though there is only one macro with Macro = {$M} on this host.
      Expected: configuration of the host should be successfully saved, because there is only one macro {$M} on the host, even though it changed its place from row 1 to row 2.

      Example:

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

              Created:
              Updated: