Skip to content
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

Sector Nord AG: Added Column TicketAccountedTime for Dashboard, TicketOverview/Small and Linkobject/Ticket #574

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Kernel/Config/Files/XML/Ticket.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6111,6 +6111,7 @@
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -6164,6 +6165,7 @@
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -6217,6 +6219,7 @@
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -6270,6 +6273,7 @@
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13148,6 +13152,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13186,6 +13191,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13224,6 +13230,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13262,6 +13269,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13300,6 +13308,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13338,6 +13347,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13376,6 +13386,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13414,6 +13425,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13452,6 +13464,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="2"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="1"></Item>
Expand Down Expand Up @@ -13531,6 +13544,7 @@ Thanks for your help!
<Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
<Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
</DefaultItem>
<Item Key="AccountedTime" SelectedID="1"></Item>
<Item Key="Age" SelectedID="1"></Item>
<Item Key="Changed" SelectedID="1"></Item>
<Item Key="Created" SelectedID="2"></Item>
Expand Down Expand Up @@ -13558,6 +13572,7 @@ Thanks for your help!
</Item>
<Item Key="Priority">
<Hash>
<Item Key="AccountedTime">330</Item>
<Item Key="Age">110</Item>
<Item Key="Changed">120</Item>
<Item Key="Created">310</Item>
Expand Down
3 changes: 3 additions & 0 deletions Kernel/Output/HTML/Dashboard/TicketGeneric.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,9 @@ sub Run {
}
$DataValue = $CustomerCompanyData{CustomerCompanyName};
}
elsif ( $Column eq 'AccountedTime' ) {
$DataValue = $TicketObject->TicketAccountedTimeGet( TicketID => $Ticket{TicketID} );
}
else {
$DataValue = $Ticket{$Column};
}
Expand Down
5 changes: 5 additions & 0 deletions Kernel/Output/HTML/LinkObject/Ticket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ our @ObjectDependencies = (
'Kernel::System::Log',
'Kernel::System::Priority',
'Kernel::System::State',
'Kernel::System::Ticket',
'Kernel::System::Type',
'Kernel::System::User',
'Kernel::System::Web::Request',
Expand Down Expand Up @@ -221,6 +222,7 @@ sub TableCreateComplex {
my $UserObject = $Kernel::OM->Get('Kernel::System::User');
my $JSONObject = $Kernel::OM->Get('Kernel::System::JSON');
my $LanguageObject = $Kernel::OM->Get('Kernel::Language');
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');

# load user preferences
my %Preferences = $UserObject->GetPreferences(
Expand Down Expand Up @@ -507,6 +509,9 @@ sub TableCreateComplex {
elsif ( $Column eq 'State' || $Column eq 'Priority' || $Column eq 'Lock' ) {
$Hash{'Content'} = $LanguageObject->Translate( $Ticket->{$Column} );
}
elsif ( $Column eq 'AccountedTime' ) {
$Hash{'Content'} = $TicketObject->TicketAccountedTimeGet( TicketID => $TicketID ) || "-";
}
else {
$Hash{'Content'} = $Ticket->{$Column};
}
Expand Down
3 changes: 3 additions & 0 deletions Kernel/Output/HTML/TicketOverview/Small.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,9 @@ sub Run {
$BlockType = 'Time';
$DataValue = $Article{$TicketColumn} || $UserInfo{$TicketColumn};
}
elsif ( $TicketColumn eq 'AccountedTime' ) {
$DataValue = $TicketObject->TicketAccountedTimeGet( TicketID => $Article{TicketID} );
}
elsif ( $TicketColumn eq 'Responsible' ) {

my %ResponsibleInfo = $UserObject->GetUserData(
Expand Down
Loading