Skip to content

Instantly share code, notes, and snippets.

open: Kernel/Output/HTML/Standard/AgentTicketZoom.dtl
replace line 110 (<p class="Value" title="$QData{"Queue"}">$QData{"Queue","18"}</p>) with:
<p class="Value" title="$QData{"Queue"}"><a href="$Env{"Baselink"}Action=AgentTicketQueue;QueueID=$QData{"QueueID"}">$QData{"Queue"}</a></p>
<!-- dtl:block:ToolBarSearchFulltext -->
<li class="Extended SearchFulltext">
<form action="$Env{"CGIHandle"}" method="post" name="SearchFulltext">
<input type="hidden" name="Action" value="AgentTicketSearch"/>
<input type="hidden" name="Subaction" value="Search"/>
<input type="hidden" name="SearchTemplate" value="$Text{"Search"}"/>
<input type="hidden" name="CheckTicketNumberAndRedirect" value="1"/>
<li class="Extended SearchFulltext">
<input type="text" size="$QData{"Size"}" name="Fulltext" id="Fulltext" value="$QData{"Fulltext"}" placeholder="$Text{"Fulltext search"}" title="$Text{"Fulltext Search"}"/>
</li>
May 12 12:15:27 SIJN-NAS01 kernel: EXT4-fs error (device dm-0): ext4_ext_find_extent:664: inode #87457949: comm nfsd: bad header/extent: invalid
May 12 12:15:32 SIJN-NAS01 kernel: ------------[ cut here ]------------
May 12 12:15:33 SIJN-NAS01 kernel: kernel BUG at fs/ext4/extents.c:1923!
May 12 12:15:33 SIJN-NAS01 kernel: invalid opcode: 0000 [#1] SMP
May 12 12:15:33 SIJN-NAS01 kernel: last sysfs file: /sys/devices/system/rn_lcd/rn_lcd0/lcd_line2
May 12 12:15:33 SIJN-NAS01 kernel: CPU 1
May 12 12:15:33 SIJN-NAS01 kernel: Modules linked in: target_core_file iscsi_target_mod target_core_mod pvgpio nv6lcd nv6vpd(P)
May 12 12:15:33 SIJN-NAS01 kernel:
May 12 12:15:33 SIJN-NAS01 kernel: Pid: 2275, comm: nfsd Tainted: P 2.6.37.6.RNx86_64.2.2 #1 /
May 12 12:15:33 SIJN-NAS01 kernel: RIP: 0010:[<ffffffff88150fef>] [<ffffffff88150fef>] ext4_ext_put_in_cache+0x5f/0x70
@xhoy
xhoy / validate_models.rake
Created September 10, 2013 14:26
validate models vs db in an rails app
# file: validate_models.rake
# task: rake db:validate_models
namespace :db do
desc "Run model validations on all model records in database"
task :validate_models => :environment do
puts "-- records - model --"
Dir.glob(Rails.root.join('app/models/**/*.rb')).each { |file| require file }
ActiveRecord::Base.descendants.select { |c|
c.base_class == c}.sort_by(&:name).each do |klass|
total = klass.count
@xhoy
xhoy / cups_error
Last active December 29, 2015 15:29
d [28/Nov/2013:14:10:46 +0100] cupsdAcceptClient(lis=0x7f6c91fd9cc0(10)) Clients=0
D [28/Nov/2013:14:10:46 +0100] cupsdAcceptClient: 15 from localhost (Domain)
d [28/Nov/2013:14:10:46 +0100] cupsdAddSelect(fd=15, read_cb=0x7f6c904d7cb0, write_cb=(nil), data=0x7f6c91fe4150)
d [28/Nov/2013:14:10:46 +0100] cupsdCheckJobs: 0 active jobs, sleeping=0, reload=0
D [28/Nov/2013:14:10:46 +0100] Report: clients=1
D [28/Nov/2013:14:10:46 +0100] Report: jobs=237
D [28/Nov/2013:14:10:46 +0100] Report: jobs-active=0
D [28/Nov/2013:14:10:46 +0100] Report: printers=1
D [28/Nov/2013:14:10:46 +0100] Report: printers-implicit=0
@xhoy
xhoy / myDashboard.xml
Created June 20, 2014 19:13
add dashboard pannel to otrs
<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="1.0" init="Application">
<ConfigItem Name="DashboardBackend###0910-TicketOpen-Administratie" Required="0" Valid="1">
<Description Lang="en">Parameters for the dashboard backend. ...</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Dashboard</SubGroup>
<Setting>
<Hash>
<Item Key="Module">Kernel::Output::HTML::DashboardTicketGeneric</Item>
@xhoy
xhoy / AgentDashboardTicketGeneric.dtl
Created June 20, 2014 19:18
Add escalation to OTRS dashboard
<!-- dtl:block:ContentLargeTicketGenericFilterResponsible -->
<li class="$QData{"Responsible::Selected"}"><a href="#" id="Dashboard$QData{"Name"}Responsible">$Text{"My responsibilities"} ($QData{"Responsible"})</a></li>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#Dashboard$QData{"Name"}Responsible').unbind('click').bind('click', function(){
$('#Dashboard$QData{"Name"}-box').addClass('Loading');
Core.AJAX.ContentUpdate($('#Dashboard$QData{"Name"}'), '$Env{"Baselink"}Action=$Env{"Action"};Subaction=Element;Name=$QData{"Name"};Filter=Responsible', function () {
Core.UI.Table.InitCSSPseudoClasses($('#Dashboard$QData{"Name"}'));
$('#Dashboard$QData{"Name"}-box').removeClass('Loading');
});
@xhoy
xhoy / console.rb
Last active August 29, 2015 14:13
emails_user_type = if emails.user_type.present?
email.user_type.to_a
else
[Email.new(emailaddress: "dummy@dummy.com")]
end
@xhoy
xhoy / byebug.rb
Created January 20, 2015 13:30
callback issue
InvoicePayment.create()
byebug =>
invoice_payments.size => 1
(byebug) id => 2861
(byebug) Invoice.find(2861).invoice_payments.size => 2
@xhoy
xhoy / console.rb
Created January 21, 2015 16:30
WTF?
2.0.0-p594 :036 > x
=> nil
2.0.0-p594 :037 > x = {}
=> {}
2.0.0-p594 :038 > y = x
=> {}
2.0.0-p594 :039 > z = x
=> {}
2.0.0-p594 :040 > y["foo"] = "bar"
=> "bar"