File tree Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -8604,6 +8604,13 @@ via the Preferences button after logging in.
8604
8604
<Item ValueType="Checkbox">0</Item>
8605
8605
</Value>
8606
8606
</Setting>
8607
+ <Setting Name="TimeShowCreatedAt" Required="0" Valid="1">
8608
+ <Description Translatable="1">Shows creation date instead of age if ticket is older than 24 hours.</Description>
8609
+ <Navigation>Core::Time</Navigation>
8610
+ <Value>
8611
+ <Item ValueType="Checkbox">0</Item>
8612
+ </Value>
8613
+ </Setting>
8607
8614
<Setting Name="AdminCustomerUser::RunInitialWildcardSearch" Required="1" Valid="1">
8608
8615
<Description Translatable="1">Runs an initial wildcard search of the existing customer users when accessing the AdminCustomerUser module.</Description>
8609
8616
<Navigation>Frontend::Admin::View::CustomerUser</Navigation>
Original file line number Diff line number Diff line change @@ -2328,6 +2328,7 @@ sub CustomerAge {
2328
2328
my $ConfigObject = $Kernel::OM -> Get(' Kernel::Config' );
2329
2329
2330
2330
my $Age = defined ( $Param {Age } ) ? $Param {Age } : return ;
2331
+ my $CreatedAt = $Param {CreatedAt } || ' ' ;
2331
2332
my $Space = $Param {Space } || ' <br/>' ;
2332
2333
my $AgeStrg = ' ' ;
2333
2334
my $DayDsc = Translatable(' d' );
@@ -2343,6 +2344,19 @@ sub CustomerAge {
2343
2344
$AgeStrg = ' -' ;
2344
2345
}
2345
2346
2347
+ if ( $Param {CreatedAt } && $ConfigObject -> Get(' TimeShowCreatedAt' ) && $Age >= 86400 ) {
2348
+
2349
+ my $CreatedAtDateTimeObject = $Kernel::OM -> Create(
2350
+ ' Kernel::System::DateTime' ,
2351
+ ObjectParams => {
2352
+ String => $Param {CreatedAt },
2353
+ },
2354
+ );
2355
+
2356
+ return $CreatedAtDateTimeObject -> ToString();
2357
+
2358
+ }
2359
+
2346
2360
# get days
2347
2361
if ( $Age >= 86400 ) {
2348
2362
$AgeStrg .= int ( ( $Age / 3600 ) / 24 ) . ' ' ;
Original file line number Diff line number Diff line change @@ -416,8 +416,9 @@ sub _Show {
416
416
417
417
# create human age
418
418
$Article {Age } = $LayoutObject -> CustomerAge(
419
- Age => $Article {Age },
420
- Space => ' ' ,
419
+ Age => $Article {Age },
420
+ Space => ' ' ,
421
+ CreatedAt => $Article {Created },
421
422
);
422
423
423
424
# fetch all std. templates ...
Original file line number Diff line number Diff line change @@ -451,8 +451,9 @@ sub _Show {
451
451
452
452
# create human age
453
453
$Article {Age } = $LayoutObject -> CustomerAge(
454
- Age => $Article {Age },
455
- Space => ' ' ,
454
+ Age => $Article {Age },
455
+ Space => ' ' ,
456
+ CreatedAt => $Article {Created },
456
457
);
457
458
458
459
# get queue object
Original file line number Diff line number Diff line change @@ -528,8 +528,9 @@ sub Run {
528
528
529
529
# create human age
530
530
$Article {Age } = $LayoutObject -> CustomerAge(
531
- Age => $Article {Age },
532
- Space => ' ' ,
531
+ Age => $Article {Age },
532
+ Space => ' ' ,
533
+ CreatedAt => $Article {Created },
533
534
);
534
535
535
536
# get ACL restrictions
You can’t perform that action at this time.
0 commit comments