Re: [dev] Strange behavior in layout output
Hi, On 02/19/2016 03:11 PM, Finetti, Stefano wrote: Greetings to everyone, I posted this message in the general otrs list but I think that the dev list is more appropriate for this kind of questions. Let me know if I'm wrong, please. I must confess I'm a bit lost with something that never happened before with other customizations I've done in OTRS. I'm trying to create a module for OTRS 4 to help my colleagues work with our AS400 systems. Nothing very strange, just a new menu to be used to check various informations about the systems. I'm not completely new to OTRS customizations, and I've managed to create some custom module using LayoutObject, DBObject and so. This is not a code problem, or at least, not an easy one to spot. When I access the page I created, I got the output correctly formatted from the query I run on an external DB, and, - and this is the problem - a long string just below the navigation menu containing a sequence of numbers, that I've identified with the number of records that my queries get. Maybe some part of the code you use (like a library to the connect to the backend) has debugging print statements in it? You could try to run that code in isolation from the command line (that is, not through the browser and web server) and see if it produces output. And/or you can try a trick like described in here: http://stackoverflow.com/a/3508679/14132 to capture output, but only from within Perl (if it calls a C library that prints to STDOUT, this won't capture it). Hope this helps, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
[dev] On NodeIDs
Hi all, I'm a bit surprised by the restrictions on the NodeIDs: # check NodeID, if does not match is impossible to continue if ( $Self->{NodeID} !~ m{ \A \d+ \z }xms && $Self->{NodeID} > 0 && $Self->{NodeID} < 1000 ) { $Kernel::OM->Get('Kernel::System::Log')->Log( Priority => 'error', Message => "NodeID '$Self->{NodeID}' is invalid!", ); return; } I'd love to use the hostname as the default NodeID, because then it would automatically work both in single node and cluster setups, and there would be no hassle allocating unique, integer node IDs, but the current restrictions disallow that. What's the motivation for restricting the NodeIDs thusly? If security is a concern (and I see it is used as a cache key), maybe using md5hex($NodeID) would be a good solution? Cheers, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
[dev] Unlocking tickets of invalid agents
Hi all, at my employer, we have a small tool that unlocks all open or stalled tickets from agents that are no longer valid. The idea is not to forget tasks (in the form of tickets) just because an employee left. I want to bring this feature upstream, and my question is: in which form should it be done? I have a few ideas: * A TicketSearch option (AgentValid = 2 or so), and then hook that into GenericAgent * A new console module, Maint::Ticket::UnlockFromInvalidAgent * Put it into the existing Maint::Ticket::InvalidUserCleanup console module. Any opinions on what's best? Cheers, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Re: [dev] Idea: run tests in transactions, roll them back
On 06/15/2015 09:18 AM, Martin Gruner wrote: Hello Moritz, this is a nice idea indeed. Technically this could be easily implemented in the UnitTestHelper as a new parameter (like RestoreSystemConfiguration) which also cleans up the cache after the test. It has some limitations (MyISAM, Selenium etc.), but could help with some things as well. Transactions are a topic that we should adress also in the regular code of OTRS at some point, but this might be a bigger effort. For now we could just use $DBObject-{dbh}-*() in the Helper object. If you want you can create a test implementation as a PR that actually tests the functionality of the rollback. Then I could merge it into master and check what our unit test servers say about it. :-P And here it is: https://github.com/OTRS/otrs/pull/607 If the smoke tests come out green (or green enough for your taste ;-), I'd propose an API like my $ScopeGuard = $Self-CleanupOnDestroy(); ( or maybe $HelperObject-CleanupOnDestroy ) and when $ScopeGuard goes out of scope (due to the test file being done), its DESTROY method will roll back the current transaction and clean the cache. Depending on the scoping of these objects, this behavior might go into the UnitTest or UnitTest::Helper objects -- but currently I don't have a good overview whether they live just for one test file, or longer. Cheers, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
[dev] Idea: run tests in transactions, roll them back
Hi all, in order to isolate tests from each other, we could consider starting a database transaction before running a test file, and then rolling back the transaction after the test file finished running. Then new objects (queues, users, groups, tickets) wouldn't need to be cleaned up manually at the end of a test, and the cleanup would even happen if a test aborts early. However, it'd only work for tests that don't want to establish their own DB connections, and not for tests that rely on inter-process communication (those couldn't share a transaction). Do you think this idea is worth pursuing? (afaict all of the supported DBs implement transactions just fine, except mysql on myisam, and DBI already provides a simple interface ($dbh-begin_work, $dbh-commit, $dbh-rollback)). Cheers, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Re: [dev] [OTRS] JavaScriptError: Cannot call method 'Init' of undefined
On 04/08/2015 07:57 AM, Ali Umair wrote: Hi, - Browser *(Client Browser firfox and chrome)* - OS *(Client browser linx and OTRS running on Linux)* - OTRS Version *(3.0.6)* - What Host (Linux, Win) *Host is linux* - Webserver *(Apache)* - Is anything in the logs (apache / nginx error log) and OTRS Log that maybe related to you action - when does the error occur? * When i hit on Login page Too Old browser message displayed Maybe the problem is actually what the error message says? Your browsers are too old? You didn't include the browser versions. Cheers, Moritz and on alert bo javascript message displayed of *TypeError: Cannot call method 'Init' of undefined* in common JS file In error log:* [Sat Mar 28 23:44:11 2015] [error] [;] File does not exist: /opt/iplOTRS/var/httpd/htdocs/skins/Agent/default/css-cache/CommonCSS_f0d8130800dc2d7b6a226b692b4a8776.css, referer: https://support.innovative-pk.com/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;Profile=last-search;SortBy=Age;OrderBy=Down;TakeLastSearch=1;StartHit=1;TicketID=161936 [Sat Mar 28 23:44:13 2015] [error] [;] File does not exist: /opt/iplOTRS/var/httpd/htdocs/js/js-cache/CommonJS_26da628935b53a24253a5f2450c56db2.js, referer: https://support.innovative-pk.com/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;Profile=last-search;SortBy=Age;OrderBy=Down;TakeLastSearch=1;StartHit=1;TicketID=161936 [Sat Mar 28 23:44:22 2015] [error] [;] File does not exist: /opt/iplOTRS/var/httpd/htdocs/js/js-cache/CommonJS_26da628935b53a24253a5f2450c56db2.js, referer: https://support.innovative-pk.com/otrs/index.pl *In access log i get following msgs:* ; - - [29/Mar/2015:03:57:26 -0700] GET /otrs/index.pl HTTP/1.1 200 10732 - Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 ;2 - - [29/Mar/2015:03:57:27 -0700] GET / 200 275 - - ; - - [29/Mar/2015:03:57:27 -0700] GET /otrs-web/js/js-cache/ModuleJS_262e1655ed48a1645e7d6aaa7eab7cd8.js HTTP/1.1 200 680 https://support.innovative-pk.com/otrs/index.pl; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 ; - - [29/Mar/2015:03:57:27 -0700] GET /otrs-web/js/js-cache/CommonJS_bb6e60a0b78bf3e1bd894440b20a34a8.js HTTP/1.1 200 300568 https://support.innovative-pk.com/otrs/index.pl; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 ; - - [29/Mar/2015:03:57:40 -0700] GET /otrs-web/skins/Agent/default/css-cache/CommonCSS_d2cb2cb04e61217e3345baf51d998492.css HTTP/1.1 404 283 https://support.innovative-pk.com/otrs/index.pl; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 ; - - [29/Mar/2015:03:57:40 -0700] GET /otrs-web/skins/Agent/default/css/thirdparty/ui-theme/jquery-ui.css HTTP/1.1 200 30158 https://support.innovative-pk.com/otrs/index.pl; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 ; - - [29/Mar/2015:03:57:40 -0700] GET /otrs-web/js/js-cache/CommonJS_dd46ed1a27280cd74ffde3b1f18acd58.js HTTP/1.1 404 263 https://support.innovative-pk.com/otrs/index.pl; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 On 4/8/2015 10:43 AM, Johannes Nickel wrote: Hey, to help you we need some more information like: - Browser - OS - OTRS Version - What Host (Linux, Win) - Webserver - Is anything in the logs (apache / nginx error log) and OTRS Log that maybe related to you action - when does the error occur? regards Johannes 2015-04-08 7:10 GMT+02:00 Ali Umair aum...@i2cinc.com mailto:aum...@i2cinc.com: Hi, I am facing same issue in OTRS. Can anyone please guide how i fix this issue?? Its humble request if someone help or guide me?? [ERROR] JavaScriptError: Cannot call method 'Init' of undefined • /otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:212Uncaught TypeError: Cannot call method 'Init' of undefined • TargetNS.HandleFinalError/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:212 • (anonymous function)/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:546 • c.b.extend.ready/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:37 • c.t/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:37 /otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:168[ERROR] JavaScriptError: Cannot call method 'Init' of undefined • /otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:212Uncaught TypeError: Cannot call method 'Init' of undefined • TargetNS.HandleFinalError/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:212 • (anonymous function)/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:546 • c.b.extend.ready/otrs-web/js/js-cache/CommonJS_164eff894a813f6591b6435b5c04d077.js:37 -- -- *Best Regards* *Ali Umair *
Re: [dev] Fixing a translation bug in Login page
On 29.03.2015 18:10, Úr Balázs wrote: Hi, I would like to fix a translation bug in the Login page, but I'm not a perl programmer, so I don't know the syntax. The problem is in Kernel/Output/HTML/Standard/Login.tt file at line 171: [% Translate(Welcome to %s, Config(ProductName)) | html %] This is not working, displaying Welcome to OTRS 4 in Hungarian too. To display a correct Hungarian message (Üdvözli az OTRS 4) I made this change: [% Translate(Welcome to) | html %] [% Config(ProductName) %] I know this is not the correct solution, but it works. How to fix it corretly? The string %s is replaced by the product name, so couldn't you just use the translation Üdvözli az %s? Cheers, Moritz smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Re: [dev] OTRS error in Log file
On 30.03.2015 14:36, Ali Umair wrote: Dear Moritz, Thanks for your reply, Following query state is empty.. due to some dashboard configuration. but do you know this configuration is stored in which file? so that i can remove or i am able to fix this issue? This particular configuration is part of the database, and you can change it through the admin web frontend (Ticket Settings - States) SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( ) AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 829, 876, 913) AND st.until_time = 1427722133 LIMIT 1 On 3/30/2015 4:39 PM, Moritz Lenz wrote: Hi, On 30.03.2015 13:29, Ali Umair wrote: Team, I am continuously facing following exception in OTRS, and i am unable to track Anybody can suggest the root cause of this exception ? if no user access the OTRS application but still this exception is printing in error log continuously... [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] index.pl: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.queue_id IN (99) AND sq.group_id IN (802, 807, 820, 822, 829, 876,' at line 1 at /opt/iplOTRS/bin/cgi-bin/../../Kernel/System/DB.pm line 553. [Sun Mar 29 17:29:53 2015] [error] ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Sun Mar 29 17:29:53 2015 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.queue_id IN (99) AND sq.group_id IN (802, 807, 820, 822, 829, 876,' at line 1, SQL: 'SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( ) AND st.queue_id IN (99) That's the problem here: the list of ticket states is empty, and the SQL syntax doesn't allow an empty list here. So, why is it empty? The dashboard does a search for tickets (or probably more than one search, but at least one is problematic), and selects by certain ticket states, but no ticket states match the search criteria. I don't know the dashboard well, but I guess there'll be a search by viewable states, so maybe somebody configured your OTRS to not contain any valid, viewable states? Cheers, Moritz AND sq.group_id IN (802, 807, 820, 822, 829, 876, 913) AND st.until_time = 1427722133 LIMIT 1' [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Traceback (12647): [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Ticket::TicketSearch (v1.488.2.1) Line: 5136 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Output::HTML::DashboardTicketGeneric::Run (v1.38) Line: 224 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::_Element (v1.24) Line: 458 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::Run (v1.24) Line: 307 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 853 [Sun Mar 29 17:29:53 2015] [error] Module: /opt/iplOTRS/bin/cgi-bin/index.pl (v1.89) Line: 45 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] index.pl: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 82' at line 1 at /opt/iplOTRS/bin/cgi-bin/../../Kernel/System/DB.pm line 553. [Sun Mar 29 17:29:53 2015] [error] ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Sun Mar 29 17:29:53 2015 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 82' at line 1, SQL: 'SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( ) AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 829, 876, 913) AND st.until_time = 1427722133 LIMIT 1' [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Traceback (12647): [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Ticket::TicketSearch (v1.488.2.1) Line: 5136 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Output::HTML::DashboardTicketGeneric::Run (v1.38) Line: 224 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::_Element (v1.24) Line: 458 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules
Re: [dev] OTRS error in Log file
Hi, On 30.03.2015 13:29, Ali Umair wrote: Team, I am continuously facing following exception in OTRS, and i am unable to track Anybody can suggest the root cause of this exception ? if no user access the OTRS application but still this exception is printing in error log continuously... [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] index.pl: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.queue_id IN (99) AND sq.group_id IN (802, 807, 820, 822, 829, 876,' at line 1 at /opt/iplOTRS/bin/cgi-bin/../../Kernel/System/DB.pm line 553. [Sun Mar 29 17:29:53 2015] [error] ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Sun Mar 29 17:29:53 2015 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.queue_id IN (99) AND sq.group_id IN (802, 807, 820, 822, 829, 876,' at line 1, SQL: 'SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( ) AND st.queue_id IN (99) That's the problem here: the list of ticket states is empty, and the SQL syntax doesn't allow an empty list here. So, why is it empty? The dashboard does a search for tickets (or probably more than one search, but at least one is problematic), and selects by certain ticket states, but no ticket states match the search criteria. I don't know the dashboard well, but I guess there'll be a search by viewable states, so maybe somebody configured your OTRS to not contain any valid, viewable states? Cheers, Moritz AND sq.group_id IN (802, 807, 820, 822, 829, 876, 913) AND st.until_time = 1427722133 LIMIT 1' [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Traceback (12647): [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Ticket::TicketSearch (v1.488.2.1) Line: 5136 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Output::HTML::DashboardTicketGeneric::Run (v1.38) Line: 224 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::_Element (v1.24) Line: 458 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::Run (v1.24) Line: 307 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 853 [Sun Mar 29 17:29:53 2015] [error] Module: /opt/iplOTRS/bin/cgi-bin/index.pl (v1.89) Line: 45 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] index.pl: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 82' at line 1 at /opt/iplOTRS/bin/cgi-bin/../../Kernel/System/DB.pm line 553. [Sun Mar 29 17:29:53 2015] [error] ERROR: OTRS-CGI-10 Perl: 5.10.1 OS: linux Time: Sun Mar 29 17:29:53 2015 [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 82' at line 1, SQL: 'SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( ) AND st.responsible_user_id IN (16) AND sq.group_id IN (802, 807, 820, 822, 829, 876, 913) AND st.until_time = 1427722133 LIMIT 1' [Sun Mar 29 17:29:53 2015] [error] [Sun Mar 29 17:29:53 2015] [error] Traceback (12647): [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Ticket::TicketSearch (v1.488.2.1) Line: 5136 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Output::HTML::DashboardTicketGeneric::Run (v1.38) Line: 224 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::_Element (v1.24) Line: 458 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::Modules::AgentDashboard::Run (v1.24) Line: 307 [Sun Mar 29 17:29:53 2015] [error] Module: Kernel::System::Web::InterfaceAgent::Run (v1.58.2.1) Line: 853 [Sun Mar 29 17:29:53 2015] [error] Module: /opt/iplOTRS/bin/cgi-bin/index.pl (v1.89) Line: 45 [Sun Mar 29 17:29:53 2015] [error] -- -- *Best Regards* *Ali Umair* ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev smime.p7s Description: S/MIME cryptographic signature ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive:
Re: [dev] OTRS Ajax/JSON Issues
Hi Dan, On 12/28/2013 04:44 PM, Dan Stover wrote: I am running OTRS 3.2.7 and have a beta system running at the same time. A while back, I ran into an issue on the live system where, when a user selects an item from a dynamic field drop down list, an Ajax communications error is generated. This does not happen on the beta system on the same virtual machine. Could you please be more specific? What's that error message? If you do it in firefox with firebug enabled, what does the Net tab show? Are there any error messages in the log? FWIW I could imagine that an incomplete user record in the database causes server-side errors, and that would explain why you don't see the same error in beta (which hopefully uses a different database). It appears to be related to the following call in AgentTicketProcess.pm but is endemic through the entire live system (only with drop down lists and multiselect boxes); my $JSON = $Self-{LayoutObject}-BuildSelectionJSON( [@JSONCollector] ); Any advice would be appreciated. Thanks…Dan. Cheers, Moritz ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Re: [dev] Proposal for speeding up TicketAcls
Hi Carlos, On 12/14/2013 01:45 AM, Carlos Rodríguez wrote: On Dec 12, 2013, at 11:12 AM, Moritz Lenz moritz.l...@noris.de mailto:moritz.l...@noris.de wrote: Hi, On 12/12/2013 09:18 AM, Martin Gruner wrote: Hi Moritz, this sounds great to me. and it turns out it's not too hard to implement either :-) Seehttps://github.com/OTRS/otrs/pull/180 Am 10.12.13 13:58, schrieb Moritz Lenz: As a further note, most information seems to show up twice in the %Checks argument to the Acl module, for example both as $Checks{Owner} and $Checks{Ticket}{Owner}. To get the desired speedup, a module which only lists the check 'Ticket' would get whatever data TicketGet returns, not the additional data that is currently added in method TicketAcl. I'm not sure about this one. Let's hear what Carlos Rodriguez has to say about it. I have mitigated possible fallout from this approach by looking a bit deeper into the ACL. If for example an ACL has Properties = { Ticket = { Queue = ... } } then both the Ticket and the Queue data is fetched. Which makes all the available ACL unit tests pass. The problem I see here is that Properties hash does not mandatory needs a Ticket hash, but it could be for example: Properties = { Queue = { Calendar = [‘MyCalendar’], }, }, Then if we get the parameter ‘QueueID’ we needed also to do a QueueGet() in this case (in order to match the Calendar name with the ACL). I've stumbled onto this problem during the implementation, and the solution is simple: TicketAcl also calls TicketGet and pre-fills the Ticket hash, because pretty much everything else depends on it. There are lots of unit tests like this, for example https://github.com/moritz/otrs/blob/feature-ticketacl-master/scripts/test/Ticket/TicketACL.t#L363 and the branch doesn't regress on any tests (and adds a few, fwiw). Cheers, Moritz ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
Re: [dev] Proposal for speeding up TicketAcls
Hi, On 12/12/2013 09:18 AM, Martin Gruner wrote: Hi Moritz, this sounds great to me. and it turns out it's not too hard to implement either :-) See https://github.com/OTRS/otrs/pull/180 Am 10.12.13 13:58, schrieb Moritz Lenz: Hi all, recently I found out that although we use only very few ACLs, the ACL mechanism slows down our OTRS installation. Part of the problem is that our CustomerUser-backend talks to an external data source, which is slow. But the problem is more general: Lots of data is assembled in Kernel::System::Ticket-TicketACL, which isn't actually used later on. Since ACLs are also checked for ticket lists (like in AgentTicketQueue or AgentTicketSearch), this can be a significant overhead. For normal ACLs, we can easily find out which data they actually use. For ACL modules, I propose we add extra configuration. Before, the configuration of an ACL module looks like this in Kernel::Config: $Self-{'Ticket::Acl::Module'}-{'TheAclModulename'} = { Module = 'Kernel::System::Ticket::Acl::TheAclModule', }; If we extend that to something like this: $Self-{'Ticket::Acl::Module'}-{'TheAclModulename'} = { Module = 'Kernel::System::Ticket::Acl::TheAclModule', Checks = ['Owner', 'Queue', 'SLA', 'Ticket'], ReturnType = 'Ticket', ReturnSubType = ['State', 'Service'], }; we can apply two optimizations: 1) Only invoke an Acl Module if the ReturnType and ReturnSubType overlap with the TicketAcl params ReturnType and ReturnSubType 2) Only gather data for the requested Checks elements. If for example no Acl and no ACL module depends on the Service or the CustomerUser, than those pieces of infomation don't need to retrieved at all. Yes. This can be implemented backwards compatible, i. e. if the configuration is not present, always run the ACL. That's how I've done it in https://github.com/moritz/otrs/commit/e1ccd3f5d8b625580e52c41d21d8846062f9f32f As a further note, most information seems to show up twice in the %Checks argument to the Acl module, for example both as $Checks{Owner} and $Checks{Ticket}{Owner}. To get the desired speedup, a module which only lists the check 'Ticket' would get whatever data TicketGet returns, not the additional data that is currently added in method TicketAcl. I'm not sure about this one. Let's hear what Carlos Rodriguez has to say about it. I have mitigated possible fallout from this approach by looking a bit deeper into the ACL. If for example an ACL has Properties = { Ticket = { Queue = ... } } then both the Ticket and the Queue data is fetched. Which makes all the available ACL unit tests pass. P.S. for the sake of completeness I've gone through Kernel::System::Ticket, and looked up the possible values for Checks, ReturnType and ReturnSubType. Here they are: Checks: CustomerUser DynamicField Frontend Owner Priority Process Queue Responsible Service SLA State Ticket Type ReturnType: Action Ticket ReturnSubType: Type Queue State Service SLA Priority Nice. Please feel free to add this to the POD, and also to improve the existing code where you see fit. I'll update the documentation a bit. Cheers, Moritz ___ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev