[ZBX-4468] There is possibility to create value mappings with the same name Created: 2011 Dec 20 Updated: 2017 May 30 Resolved: 2012 Jan 09 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 1.9.9 (beta) |
Fix Version/s: | 1.8.11, 1.9.9 (beta) |
Type: | Incident report | Priority: | Blocker |
Reporter: | Igor Danoshaites (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | valuemapping | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
1.9.9 (trunk), 1.8.x |
Issue Links: |
|
Description |
There is possibility to create value mappings with the same name (field name in the Zabbix DB), the only difference between such mappings will be value of the "valuemapid" field. In v1.8.x there is the same behaviour. |
Comments |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 27 ] |
(1) Don't use concatenation in messages, use the _s() function instead. <pavels> Not sprintf() but _s(). It's our standard gettext wrapper for strings with arguments. <pavels> CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 27 ] |
(2) The input parameters that we use in SQL queries should always be escaped. Use the zbx_dbstr to escape the name in get_valuemap() <pavels> CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2011 Dec 27 ] |
(3) We use upperCamelCase for function names. Plus, I suggest we rename the get_valuemap function to getValuemapByName($name) and make the $name parameter obligatory. <pavels> One more thing, all the tables in SQL queries must use an alias. Even if there's only one table. <pavels> CLOSED. |
Comment by Alexander Vladishev [ 2011 Dec 28 ] |
(4) [GUI] Please review my changes in r24304 |
Comment by Alexander Vladishev [ 2011 Dec 28 ] |
(5) [GUI] Cannot update value map <pavels> Still not working. REOPENED. <pavels> I thing you've meant <pavels> CLOSED. |
Comment by richlv [ 2011 Dec 28 ] |
(6) it should be "already exists" <pavels> CLOSED. |
Comment by Igor Danoshaites (Inactive) [ 2012 Jan 03 ] |
(5) [GUI] "Cannot add or update value map" -->For this on 30.12.2011 has been created separate issue <pavels> This fix hasn't been merged yet. |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 04 ] |
(6) Please review my changes in r24512. |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 04 ] |
TESTED. Please close (6) before merging. Also, after updating to the latest trunk, please, fix (5). |
Comment by Vjacheslav Shipillo (Inactive) [ 2012 Jan 04 ] |
<Slava> fixed in r 24515 |
Comment by richlv [ 2012 Jan 04 ] |
(7) merge to trunk has lots of coding guideline violations and modifies several unrelated changelog entries. i would strongly suggest reverting it, reviewing all modified code for coding style and doublechecking what it does to the changelog edit : ok, changelog probably was intentional. why wasn't it mentioned in the commit message ? <richlv> well, this time i'd say that it would be enough to fix formatting for all modified lines - but in future, describing all changes in the commit message would be highly appreciated <richlv> 24542 has a commit message "updated to latest trunk "... <pavels> CLOSED. |
Comment by Vjacheslav Shipillo (Inactive) [ 2012 Jan 05 ] |
<Slava> Pavel, please review my confict resolving in 24542 'valuemap.inc.php' <pavels> CLOSED. Before merging to trunk, please review my changes in r24578 and r24579. |
Comment by Vjacheslav Shipillo (Inactive) [ 2012 Jan 06 ] |
fixed in trunk in 24575 |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jan 06 ] |
Fix for 1.8 is TESTED. Please review my changes before merging. |
Comment by Vjacheslav Shipillo (Inactive) [ 2012 Jan 06 ] |
fixed in 1.8 r 24593 |
Comment by Oleksii Zagorskyi [ 2012 Jan 09 ] |
Reopened to replace 2.0 to 1.9.9 in the Fix version/s |
Comment by Oleksii Zagorskyi [ 2012 Jan 09 ] |
Closed again. |