[ZBX-5621] custom trigger severities not reflected in user media config Created: 2012 Sep 25  Updated: 2017 May 30  Resolved: 2013 Jun 12

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.3rc1
Fix Version/s: 2.0.4rc1, 2.0.7rc1, 2.1.0

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: media, triggerseverities
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-6684 Incorrect severity label is shown whe... Closed

 Description   

a) modify severity names in administration -> general -> trigger severities
b) open media properties for some user. changes done in (a) are not reflected in severity column (still uses NIWAHD, although tooltips are correct)



 Comments   
Comment by Oleg Egorov (Inactive) [ 2012 Sep 27 ]

Resolved in svn://svn.zabbix.com/branches/dev/ZBX-5621
REV 30382

Comment by Alexey Fukalov [ 2012 Sep 27 ]

(1)
There is problem with utf text, zbx_substr should be used instead of substr.

oleg.egorov RESOLVED

Vedmak CLOSED

Comment by Alexey Fukalov [ 2012 Sep 27 ]

(2)
Also i think function media_severity2str should be rewritten:

function media_severity2str($severity) {
	$result = array();
	foreach (getSeverityCaption() as $i => $caption) {
		$style = ($severity & (1 << $i)) ? 'enabled' : null;
		
		$result[$i] = new CSpan(zbx_substr($caption, 0, 1), $style);
		$result[$i]->setHint($caption.' ('.(isset($map['style']) ? 'on' : 'off').')');
	}

	return $result;
}

oleg.egorov RESOLVED

Vedmak CLOSED

Comment by Alexander Vladishev [ 2012 Oct 06 ]

Fixed in pre-2.0.4 r30581 and pre-2.1.0 (trunk) r30580.

Comment by Alexander Vladishev [ 2013 Jun 11 ]

(3) Moved from ZBX-6684. Incorrect severity label is shown when hovering on user profile media list item.

In User profile media tab, when hovering on added media severity labels NIWAHD, value "Off" shows for enabled severities.
This is due to checking non-existent parameter $map['style'] in file media.inc.php: 49

<richlv> hmm. this will be confusing now - issue changes were done for 2.0.4, now it is reopened, and "fix version" will be a mess...

oleg.egorov RESOLVED IN r36244

sasha REOPENED

media_severity2str() return array of objects. The function should be renamed.

Тhe previous implementation of function was one many simpler and used less variables. Let's return old implementation!

oleg.egorov RESOLVED IN r36259, 36292

sasha CLOSED Please review my changes in r36298

oleg.egorov REVIEWED

Comment by Oleg Egorov (Inactive) [ 2013 Jun 12 ]

FIXED IN 2.0.7rc1 r36302 and in 2.1.0(trunk) r36303
CLOSED

Generated at Fri Apr 26 14:48:25 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.