1 <& /Admin/Elements/Header, Title => 'Admin/Queue/Basics' &>
2 <& /Admin/Elements/QueueTabs, id => $QueueObj->id &>
3 <& /Elements/ListActions, actions => \@results &>
7 <& /Elements/TitleBoxStart, title => $title &>
10 <FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
12 <INPUT TYPE=HIDDEN NAME=id VALUE="new">
14 <INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
21 <TD><INPUT name="Name" value="<%$QueueObj->Name%>"></TD>
24 Description:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$QueueObj->Description%>" size=60></TD></TR>
27 Correspondence Address:
29 <INPUT name="CorrespondAddress" value="<%$QueueObj->CorrespondAddress%>">
30 <BR><font size="-1"><i>(If left blank, will default to <%$RT::CorrespondAddress%></i></font>
34 Comment Address: </TD><TD>
35 <INPUT NAME="CommentAddress" value="<%$QueueObj->CommentAddress%>">
36 <BR><font size="-1"><i>(If left blank, will default to <%$RT::CommentAddress%></i></font>
42 </TD><TD><INPUT NAME="InitialPriority" value="<%$QueueObj->InitialPriority %>">
45 Over time, priority moves toward:
46 </TD><TD><INPUT NAME="FinalPriority" value="<%$QueueObj->FinalPriority %>">
51 Requests should be due in:
53 <INPUT NAME="DefaultDueIn" VALUE="<%$QueueObj->DefaultDueIn%>"> days.
59 <TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
60 <INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> Enabled (Unchecking this box disables this queue)<BR>
65 <& /Elements/TitleBoxEnd &>
66 <& /Elements/Submit &>
73 my $QueueObj = new RT::Queue($session{'CurrentUser'});
74 my ($title, @results, $Disabled, $EnabledChecked);
77 $title = "Create a queue";
82 my ($val, $msg) = $QueueObj->Create(Name => $Name);
84 Abort("Could not create queue: $msg");
91 $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'");
93 $title = 'Editing Configuration for queue '.$QueueObj->Name;
96 if ($QueueObj->Id()) {
97 my @attribs= qw(Description CorrespondAddress CommentAddress Name
98 InitialPriority FinalPriority DefaultDueIn);
100 @results = UpdateRecordObject( AttributesRef => \@attribs,
106 #we're asking about enabled on the web page but really care about disabled.
113 if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) {
114 my ($code, $msg) = $QueueObj->SetDisabled($Disabled);
115 push @results, 'Enabled status '. $msg;
118 unless ($QueueObj->Disabled()) {
119 $EnabledChecked ="CHECKED";
129 $Description => undef
130 $CorrespondAddress => undef
131 $CommentAddress => undef
132 $InitialPriority => undef
133 $FinalPriority => undef
134 $DefaultDueIn => undef