Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fixed: Hardcoded Priority and State in bin/otrs.FillDB.pl (bug#8853).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinweg committed Feb 20, 2017
1 parent a9a69ef commit e93f882
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
#6.0.0.beta1 2017-??-??
- 2017-02-17 Fixed bug#[8853](https://bugs.otrs.org/show_bug.cgi?id=8853) - Hardcoded Priority and State in bin/otrs.FillDB.pl.
- 2017-02-17 Unified the search from text and textarea dynamic fields (bug#12118).
- 2017-02-17 Add support for setting owner and responsible via filter also for follow-ups, thanks to Renée Bäcker.
- 2017-01-20 Added command to list configured queues, thanks to Martin Burggraf.
Expand Down
Expand Up @@ -26,6 +26,7 @@ our @ObjectDependencies = (
'Kernel::System::Queue',
'Kernel::System::Ticket',
'Kernel::System::User',
'Kernel::System::Priority',
);

sub Configure {
Expand Down Expand Up @@ -168,7 +169,7 @@ sub Run {
Title => RandomSubject(),
QueueID => $QueueIDs[ int( rand($#QueueIDs) ) ],
Lock => 'unlock',
Priority => '3 normal',
Priority => PriorityGet(),
State => 'new',
CustomerNo => int( rand(1000) ),
CustomerUser => RandomAddress(),
Expand Down Expand Up @@ -378,6 +379,18 @@ sub RandomBody {
return $Body;
}

sub PriorityGet {
my %PriorityList = $Kernel::OM->Get('Kernel::System::Priority')->PriorityList(
Valid => 1,
);

# possible not make this one sorted - for more variation in ticket-priority.
for my $Prio ( sort keys %PriorityList ) {
return $PriorityList{$Prio};
}
return '3 normal';
}

sub QueueGet {
my @QueueIDs;
my %Queues = $Kernel::OM->Get('Kernel::System::Queue')->GetAllQueues();
Expand Down

0 comments on commit e93f882

Please sign in to comment.