Bug in criteria code for "Tickets waiting for your approval" button
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [x] I have searched the existing issues
Version
11.0.2
Bug description
There's a bug in criteria code for "Tickets waiting for your approval" button.
$opt['criteria'][1] is a subgroup of criteria, so this is not effective:
$opt['criteria'][1]['field'] = 59; // validation aprobator
Criteria for "validation aprobator" should be added within the subgroup like this:
$opt['criteria'][1]['criteria'][0]['field'] = 59; // validation aprobator
$opt['criteria'][1]['criteria'][0]['searchtype'] = 'equals';
$opt['criteria'][1]['criteria'][0]['value'] = 'myself'; // Resolved as current user's ID
And therefore, the second criteria in the subgroup should have a link item:
$opt['criteria'][1]['criteria'][1]['link'] = 'OR';
Relevant log output
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
No response
Anything else?
No response
Hi,
Could you please open a pull request with your proposal?
Hi,
Could you please open a pull request with your proposal?
Here it is: https://github.com/akindemirci/glpi/pull/1
Hi, Could you please open a pull request with your proposal?
Here it is: akindemirci#1
Pull request must be opened on glpi-project/glpi, not on your fork.
Sorry, here it is: https://github.com/glpi-project/glpi/pull/22368