[ZBX-10958] Not showing username in Action information. Also getting error. Created: 2016 Jun 30  Updated: 2018 Dec 07  Resolved: 2016 Oct 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.3
Fix Version/s: 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1

Type: Incident report Priority: Blocker
Reporter: Dmitrijs Lamberts Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: alerts, permissions, users
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 7.2.1511, zabbix_server (Zabbix) 3.0.3 Revision 60173.


Attachments: JPEG File bug1.jpg     PNG File bug2.png     PNG File bug3.png    
Issue Links:
Duplicate

 Description   

To reproduce this bug:

  1. Create User1 and User2 in seperate User groups
  2. Create Action to send notification to User1
  3. Execute created Action
  4. Log in with User2
  5. In Dashboard (Last 20 issues) or Monitoring (Events) if we click on Actions:1 column USER is empty, however if we click on ACK, in USER column we can see User1
  6. If we open Event Details - in Recipients column there are no Username. Plus in the bottom error
     Undefined offset: 1 [tr_events.php:114 ? getActionMessages() in include/actions.inc.php:1116] 

If both users are in same usergroup nothing of this happens.



 Comments   
Comment by Gunars Pujats (Inactive) [ 2016 Sep 20 ]

(1) No translation strings changed

oleg.egorov CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Sep 20 ]

(2) Running unit tests with PHPUnit v5.5 (stable) resulted with warnings:

1) CLocalApiClientTest::testCallIncorrect with data set #0 ('Api', 'method', array(), 'token', 100, 'Incorrect API "Api".')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

2) CLocalApiClientTest::testCallIncorrect with data set #1 ('user', 'incorrectMethod', array(), 'token', 100, 'Incorrect method "user.incorr...thod".')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

3) CLocalApiClientTest::testCallIncorrect with data set #2 ('user', 'get', array(), null, 200, 'Not authorised.')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

4) CLocalApiClientTest::testCallIncorrect with data set #3 ('user', 'get', array(), '', 200, 'Not authorised.')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

5) CLocalApiClientTest::testCallIncorrect with data set #4 ('Apiinfo', 'Version', array(), '', 100, 'The "Apiinfo.Version" method ...meter.')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

6) CLocalApiClientTest::testCallIncorrect with data set #5 ('Apiinfo', 'Version', null, null, 100, 'Cannot call method "Apiinfo.V...eters.')
PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

RESOLVED in r62617

oleg.egorov CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Sep 20 ]

(3) If non-super-admin user creates screen of type "Action log", and log contains messages for users from other groups, then page displays errors:

Undefined offset: 3 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:158]
Undefined offset: 9 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:163]
Undefined offset: 3 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:158]
Undefined offset: 9 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:163]
Undefined offset: 3 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:158]
Undefined offset: 9 [screens.php:147 → CView->render() → include() → CScreenBuilder->show() → CScreenActions->get() in include/classes/screens/CScreenActions.php:163]

RESOLVED in r62618

oleg.egorov CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Sep 20 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10958

Comment by Natalja Romancaka [ 2016 Sep 21 ]

(4) [F] If non-super-admin user opens screen of type "Action log" - in Recipients column there are
users emails from other groups. I guess in column should be text "Inaccessible user"

gunarspujats Moved to ZBX-11272

CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 Sep 23 ]

(5) Other, "Inaccessible user" related issue in Configuration->Actions not displayed "Send message to users:" if user is "Inaccessible".
And in Configuration->Actions->Edit not displayed operation if operation type is Send message and there is "Inaccessible user"

gunarspujats Moved to ZBX-11273

CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 Sep 23 ]

(6) Not critical issue, but recommendation.
In acknow.inc.php:54 checked by "name", but it is not mandatory field. Better use "alias".

gunarspujats RESOLVED in r62830

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2016 Oct 05 ]

TESTED

Comment by Gunars Pujats (Inactive) [ 2016 Oct 05 ]

Fixed in:

  • 3.0.6rc1 r63003
  • 3.2.2rc1 r63004
  • 3.3.0 (trunk) r63005
Comment by Oleksii Zagorskyi [ 2016 Oct 19 ]

not sure where the limit was implemented, but ZBX-11236 complains on that.

Comment by Oleksii Zagorskyi [ 2016 Oct 19 ]

The issue with error on event details is reproducible om 2.4.8 too, as:

Undefined offset: 1 [tr_events.php:121 → getActionMessages() in /zab/www-dev/2.4/include/actions.inc.php:862]
Generated at Fri Apr 26 06:05:27 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.