-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix ITIL Item Tabs #19421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix ITIL Item Tabs #19421
Conversation
04fd4d8
to
6c0a4f9
Compare
6c0a4f9
to
d8bee71
Compare
Need an initial review to make sure I haven't missed any expected functionality. Given the large number of deletions vs additions, not including the new tests, it is possible something was accidentally removed rather than there just being a ton of duplicated code. I also can never seem to figure out how tab counters are supposed to be handled when it comes to some items not being visible within the current entity or not visible because of item-specific permissions. Should tab counters always show the actual count, or visible count? Seems like the actual count would be the right option along with a note in the tab that some items are not currently visible, but that isn't how it is displayed in most places. The use of I am aware that some E2E tests are needed still. |
Honestly, it is hard to detect it, due to the amount of code changes. The most critical parts are probably tested (rules, for instance).
I agree that we should always display the actual count and with a note that indicates how many items are not shown due to visibility restrictions, but this is not how things are done right now. Maybe we should write a RFC about this in order to validate what should be the target. For the moment, I guess counters should just show how many items are visible. |
Actually it looks like this just missed the 10.0 release. So, I guess it could be refactored now.
At least the "Add ability to define linked items on TicketRecurrent" feature had no tests added for it. I don't think tests existed for how ITIL items on assets were supposed to be counted/displayed either. It seems like assets are supposed to count tickets on connected peripherals as their own tickets. Also, it isn't an immediate concern but I am interested in people's thoughts about the TODO comment I added:
|
If it simplifies something, you can refactor it, but keep in mind that we have to publish the RC release in the next few weeks and we will probably not accept a huge refactoring after that. |
de50efe
to
bf6899a
Compare
I don't think I'll have time for additional refactoring with this. |
Checklist before requesting a review
Description
Several issues were seen with various ITIL Item tabs including wrong tab counts, "Show All" button link mixing SQL criteria and search engine criteria, and some redundant/messy code. This aims to resolve #18985 and #19378. This PR
maywill turn into a rewrite due to the scope of the issues.