[Rt-commit] rtir branch, 5.0/restore-incidents-and-investigations-on-create, created. 4.0.1rc1-145-g59b3cd0b
Aaron Trevena
ast at bestpractical.com
Fri Jun 12 11:45:59 EDT 2020
The branch, 5.0/restore-incidents-and-investigations-on-create has been created
at 59b3cd0b40ee750c8d8ef4baa7fde2a8b30a10c4 (commit)
- Log -----------------------------------------------------------------
commit f653964efbac9e809975d5d2a791fc96c5742d86
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon May 18 14:26:14 2020 -0500
Core RT::Extension::CreateIncidentAndInvestigation
This commit moves the RT::Extension::CreateIncidentAndInvestigation
extension back to core RTIR.
The code was removed in commit 5f72e57 due to complexity which has
since been solved by moving the dropdown to the create pages.
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index a4ecd5a6..17a2f8c7 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -313,6 +313,19 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
</div> <!-- end ticket-create-incident -->
+<div id="ticket-create-investigation">
+<a name="investigation"></a>
+<& /RTIR/Investigation/Elements/Create,
+ %ARGS,
+ NamePrefix => 'Investigation',
+ QueueObj => $InvestigationsQueueObj,
+ Lifecycle => RT::IR->lifecycle_investigation,
+ Constituency => $constituency,
+ SkipField => { Owner => 1, Attachments => 1, DateFields => 1 },
+ IncludeSignature => (exists $ARGS{'InvestigationContent'} ? 0 : 1),
+&>
+</div>
+
% $m->callback( CallbackName => 'FormEnd', QueueObj => $QueueObj, Constituency => $constituency,
% ChildObj => $ChildObj, SplitObj => $SplitObj, ARGSRef => \%ARGS );
@@ -400,6 +413,12 @@ if (!$QueueObj->Name) {
Abort( loc("Queue '[_1]' could not be loaded.", $queue) );
}
+# Load appropriate Investigations queue
+my $InvestigationsQueue = 'Investigations' . ( $constituency ? ' - ' . $constituency : '' );
+my $InvestigationsQueueObj = RT::Queue->new( $session{'CurrentUser'} );
+my ($ret, $msg) = $InvestigationsQueueObj->Load( $InvestigationsQueue );
+RT->Logger->error("Unable to load $InvestigationsQueue : $msg") unless $ret;
+
if( !RT::IR->IsIncidentQueue($QueueObj) ) {
RT::Interface::Web::Redirect(RT::IR->HREFTo( '/Create.html?' . $m->comp('/Elements/QueryString', %ARGS )));
}
@@ -450,6 +469,23 @@ if ( $CreateIncident ) {
);
}
+if ( $CreateWithInvestigation ) {
+ $checks_failure += RT::IR->FilterRTAddresses(
+ ARGSRef => \%ARGS,
+ Fields => {
+ InvestigationRequestors => 'Requestor',
+ InvestigationCc => 'Cc',
+ InvestigationAdminCc => 'AdminCc',
+ },
+ results => \@results,
+ );
+}
+
+if ( $CreateWithInvestigation && !$InvestigationRequestors ) {
+ push @results, loc( "You must enter a correspondent for the investigation" );
+ $checks_failure = 1;
+}
+
$m->callback( CallbackName => 'BeforeCreateRedirect', ARGSRef => \%ARGS,
Child => $ChildObj, results => \@results, checks_failure => \$checks_failure );
@@ -465,6 +501,26 @@ if ( !$checks_failure && $CreateIncident ) {
push @results, @tmp;
if( $inc_obj ) {
+ my $inv_obj;
+ if ( $CreateWithInvestigation ) {
+ my (@tmp);
+ ($inv_obj, @tmp) = $m->comp(
+ '/RTIR/Investigation/Elements/Create:Process',
+ %ARGS,
+ NamePrefix => 'Investigation',
+ DefaultsNamePrefix => '',
+ );
+ push @results, @tmp;
+ if ( $inv_obj ) {
+ my($id, $msg) = $inv_obj->AddLink(
+ Type => 'MemberOf',
+ Target => $inc_obj->id
+ );
+ #XXX: correct message on success
+ push @results, $msg if !$id || $msg;
+ }
+ }
+
$m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Child => $ChildObj, TicketObj => $inc_obj,
results => \@results );
@@ -506,7 +562,9 @@ unless ( exists $ARGS{'Content'} ) {
$Title => loc("Create a new Incident")
$QuoteTransaction => undef
-$CreateIncident => 0
+$CreateWithInvestigation => 0
+$CreateIncident => $CreateWithInvestigation
+$InvestigationRequestors => 0
$Split => undef
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 69d5680b..351668c1 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -212,6 +212,13 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
% }
</table></&>
+
+<& /Elements/Submit,
+ Name => 'CreateWithInvestigation',
+ Label => loc("Create Incident and run Investigation"),
+ SubmitId => 'create-ticket-with-investigation'
+&>
+
% $m->callback( CallbackName => 'AfterTable', ARGSRef => \%ARGS, TicketObj => $ticket,
% QueueObj => $QueueObj, DefaultsFrom => $TicketObj );
</div>
commit 6982dcd0be556161947fba71a9b2f9afcf30b1db
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon May 18 19:05:39 2020 -0500
Migrate Investigation/Elements/Create to elevator themes
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 351668c1..f0cb7d37 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -50,60 +50,95 @@
<div class="ticket-create-basics">
<&| /Widgets/TitleBox, title => loc("Basics"), class => 'ticket-info-basics' &>
-<table width="100%" border="0">
-% if($Constituency) {
-%
-<tr class="constituency">
- <td class="label"><%loc('Constituency') %>:</td>
- <td><% $Constituency %></td>
-</tr>
+
+% if ($Constituency) {
+ <div class="form-row">
+ <div class="label col-3">
+ <% loc('Constituency') %>:
+ </div>
+ <div class="value col-9">
+ <span class="current-value"><% $Constituency %></span>
+ </div>
+ </div>
% }
-<tr class="queue">
- <td class="label"><&|/l&>Queue</&>:</td>
- <td>
+
+ <div class="form-row">
+ <div class="label col-3">
+ <&|/l&>Queue</&>:
+ </div>
+ <div class="value col-9">
<& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &>
- </td>
-</tr>
+ </div>
+ </div>
+
% unless ( $SkipField{'Owner'} || $HideField{'Owner'} ) {
-<tr>
- <td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& /Elements/SelectOwner,
- Name => $NamePrefix ."Owner",
- QueueObj => $QueueObj,
- Default => $value_cb->('Owner') || $session{'CurrentUser'}->Id,
-&></td></tr>
+ <div class="form-row owner">
+ <div class="label col-3">
+ <&|/l&>Owner</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/SelectOwner,
+ Name => $NamePrefix ."Owner",
+ QueueObj => $QueueObj,
+ Default => $value_cb->('Owner') || $session{'CurrentUser'}->Id,
+ &>
+ </div>
+ </div>
% }
% unless ( $SkipField{'TimeFields'} ) {
-<tr class="time-worked">
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => $NamePrefix .'TimeWorked',
+<div class="form-row">
+ <div class="label col-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/EditTimeValue,
+ Name => $NamePrefix . 'TimeWorked',
Default => $value_cb->('TimeWorked') || '',
- &></td>
- </tr>
-<tr class="time-left">
- <td class="label"><&|/l&>Time Left</&>:</td>
- <td class="value"><& /Elements/EditTimeValue,
- Name => $NamePrefix .'TimeLeft',
+ &>
+ </div>
+</div>
+<div class="form-row">
+ <div class="label col-3">
+ <&|/l&>Time Left</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/EditTimeValue,
+ Name => $NamePrefix . 'TimeLeft',
Default => $value_cb->('TimeLeft') || '',
- &></td>
-</tr>
+ &>
+ </div>
+</div>
% }
% unless ( $SkipField{'DateFields'} ) {
-<tr><td> </td><td valign="top"><&| /Widgets/TitleBox,
- title => loc("Dates"),
- class=> 'ticket-info-dates',
-&><table>
-
-<tr><td class="label"><&|/l&>Starts</&>:</td>
-<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Starts', Default => $value_cb->('Starts') || '' &></td></tr>
+<&| /Widgets/TitleBox, title => loc("Dates"), class => 'ticket-info-dates' &>
+
+<div class="form-row">
+ <div class="label col-3">
+ <&|/l&>Starts</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/SelectDate,
+ Name => $NamePrefix . 'Starts',
+ Default => $value_cb->('Starts') || '',
+ &>
+ </div>
+</div>
-<tr><td class="label"><&|/l&>Due</&>:</td>
-<td class="value"><& /Elements/SelectDate, Name => $NamePrefix .'Due', Default => $value_cb->('Due') || '' &></td></tr>
+<div class="form-row">
+ <div class="label col-3">
+ <&|/l&>Due</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/SelectDate,
+ Name => $NamePrefix . 'Due',
+ Default => $value_cb->('Due') || '',
+ &>
+ </div>
+</div>
-</table></&></td></tr>
+</&>
% }
% if ( ($QueueObj || $TicketObj) && !$SkipField{'CustomFields'} ) {
@@ -118,7 +153,7 @@
&>
% }
-</table></&>
+</&>
% if ( ($QueueObj || $TicketObj) && !$SkipField{'CustomFields'} ) {
<& /Elements/EditCustomFieldCustomGroupings,
@@ -134,90 +169,141 @@
<div class="ticket-create-details">
<&| /Widgets/TitleBox,
- title => loc("Launch Investigation"),
+ title => loc("Launch a new investigation"),
class => 'ticket-info-message',
&>
-<table width="100%" border="0">
% unless ( $SkipField{'Requestors'} || $HideField{'Requestors'} ) {
-<tr><td class="label"><&|/l&>Correspondents</&>:</td>
-<td class="value"><& /Elements/EmailInput,
- Name => $NamePrefix .'Requestors', Default => $value_cb->('Requestors'), Size => undef,
-&></td></tr>
+<div class="form-row">
+ <div class="label col-2">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/EmailInput,
+ Name => $NamePrefix . 'Requestors',
+ Default => $value_cb->('Requestors'),
+ Size => undef,
+ &>
+ </div>
+</div>
% $m->callback( CallbackName => 'AfterRequestors', ARGSRef => \%ARGS );
% }
% unless ( $SkipField{'Cc'} || $HideField{'Cc'} ) {
-<tr><td class="label"><&|/l&>Cc</&>:</td>
-<td class="value"><& /Elements/EmailInput,
- Name => $NamePrefix .'Cc', Default => $value_cb->('Cc'), Size => undef,
-&></td></tr>
-<tr><td> </td><td class="comment">
-<i><font size="-2"><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of
-email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</td></tr>
+<div class="form-row">
+ <div class="label col-2">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/EmailInput,
+ Name => $NamePrefix . 'Cc',
+ Default => $value_cb->('Cc'),
+ Size => undef,
+ &>
+ </div>
+</div>
+
+<div class="form-row">
+ <div class="label col-2"></div>
+ <div class="value col-9">
+ <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></i>
+ </div>
+</div>
% }
% unless ( $SkipField{'AdminCc'} && $HideField{'AdminCc'} ) {
-<tr><td class="label"><&|/l&>Admin Cc</&>:</td>
-<td class="value"><& /Elements/EmailInput,
- Name => $NamePrefix .'AdminCc', Default => $value_cb->('AdminCc'), Size => undef,
-&></td></tr>
-<tr><td> </td><td class="comment">
-<i><font size="-2"><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative
-email addresses. These people <b>will</b> receive future updates.)</&></font></i>
-</td></tr>
+<div class="form-row">
+ <div class="label col-2">
+ <&|/l&>Admin Cc</&>:
+ </div>
+ <div class="value col-9">
+ <& /Elements/EmailInput,
+ Name => $NamePrefix . 'AdminCc',
+ Default => $value_cb->('AdminCc'),
+ Size => undef,
+ &>
+ </div>
+</div>
+
+<div class="form-row">
+ <div class="label col-2"></div>
+ <div class="value col-9">
+ <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></i>
+ </div>
+</div>
% }
% unless ( $SkipField{'Subject'} || $HideField{'Subject'} ) {
-<tr><td class="label"><&|/l&>Subject</&>:</td>
-<td class="value">
-<input type="text" name="<% $NamePrefix %>Subject" size="60" maxsize="100" value="<% $value_cb->('Subject') %>" />
-</td></tr>
+<div class="form-row">
+ <div class="form-group label col-2">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="form-group value col-9">
+ <input class="form-control" type="text" name="<% $NamePrefix %>Subject" value="<% $value_cb->('Subject') %>" />
+ </div>
+</div>
% }
% if ( !$SkipField{'SignEncrypt'} && RT->Config->Get('GnuPG')->{'Enable'} ) {
-<tr><td> </td><td>
-<% loc('Sign')%> <& /Widgets/Form/Boolean:InputOnly,
- Name => $NamePrefix .'Sign',
- CurrentValue => $ARGS{ $NamePrefix .'Sign' },
-&>
-
-<% loc('Encrypt')%> <& /Widgets/Form/Boolean:InputOnly,
- Name => $NamePrefix .'Encrypt',
- CurrentValue => $ARGS{ $NamePrefix .'Encrypt' },
-&>
-</td></tr>
+<div class="form-row">
+ <div class="label col-2">
+
+ </div>
+ <div class="value col-9">
+ <div>
+ <% loc('Sign')%>
+ <& /Widgets/Form/Boolean:InputOnly,
+ Name => $NamePrefix . 'Sign',
+ CurrentValue => $ARGS{ $NamePrefix . 'Sign' },
+ &>
+ </div>
+ <div>
+ <% loc('Encrypt')%>
+ <& /Widgets/Form/Boolean:InputOnly,
+ Name => $NamePrefix . 'Encrypt',
+ CurrentValue => $ARGS{ $NamePrefix . 'Encrypt' },
+ &>
+ </div>
+ </div>
+</div>
% }
% unless ( $SkipField{'Content'} || $HideField{'Content'} ) {
-<tr><td class="labeltop"><&|/l&>Message</&>:</td>
-<td>
+<div class="form-group">
% if ( RT->Config->Get('ArticleOnTicketCreate')) {
-<& /Articles/Elements/BeforeMessageBox, %ARGS, QueueObj => $QueueObj, MessageBoxName => $NamePrefix .'Content' &>
+ <& /Articles/Elements/BeforeMessageBox,
+ %ARGS,
+ QueueObj => $QueueObj,
+ MessageBoxName => $NamePrefix . 'Content',
+ &>
% }
-% $m->callback( %ARGS, MessageBoxName => $NamePrefix .'Content',
+% $m->callback( %ARGS, MessageBoxName => $NamePrefix . 'Content',
% CallbackPage => '/Ticket/Create.html', CallbackName => 'BeforeMessageBox' );
% my $content = $value_cb->('Content');
-<& /Elements/MessageBox,
- Name => $NamePrefix .'Content',
- Default => $content,
- IncludeSignature => exists $ARGS{'IncludeSignature'} ? $ARGS{'IncludeSignature'} : !$content,
- QuoteTransaction => $value_cb->('QuoteTransaction'),
-&></td></tr>
+ <& /Elements/MessageBox,
+ Name => $NamePrefix . 'Content',
+ Default => $content,
+ IncludeSignature => exists $ARGS{'IncludeSignature'} ? $ARGS{'IncludeSignature'} : !$content,
+ QuoteTransaction => $value_cb->('QuoteTransaction'),
+ &>
+</div>
% }
% unless ( $SkipField{'Attachments'} ) {
<& /RTIR/Create.html:AttachmentsForm &>
% }
-</table></&>
+</&>
-<& /Elements/Submit,
- Name => 'CreateWithInvestigation',
- Label => loc("Create Incident and run Investigation"),
- SubmitId => 'create-ticket-with-investigation'
-&>
+<div class="form-row">
+ <div class="col-12">
+ <& /Elements/Submit,
+ Name => 'CreateWithInvestigation',
+ Label => loc("Create Incident and run Investigation"),
+ SubmitId => 'create-ticket-with-investigation'
+ &>
+ </div>
+</div>
% $m->callback( CallbackName => 'AfterTable', ARGSRef => \%ARGS, TicketObj => $ticket,
% QueueObj => $QueueObj, DefaultsFrom => $TicketObj );
commit 901886b042760df737c0270a2dfbecd9098d1d6c
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed May 20 17:47:16 2020 -0500
Replace Cc and AdminCc helper text with tooltips
This commit replaces the Cc and AdminCc helper text on the
create investigation element with fontawesome icons and
bootstrap tooltips.
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index f0cb7d37..c918b87a 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -193,6 +193,7 @@
<div class="form-row">
<div class="label col-2">
<&|/l&>Cc</&>:
+ <span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<&|/l&>Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people will receive future updates.</&>"></span>
</div>
<div class="value col-9">
<& /Elements/EmailInput,
@@ -202,19 +203,13 @@
&>
</div>
</div>
-
-<div class="form-row">
- <div class="label col-2"></div>
- <div class="value col-9">
- <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></i>
- </div>
-</div>
% }
% unless ( $SkipField{'AdminCc'} && $HideField{'AdminCc'} ) {
<div class="form-row">
<div class="label col-2">
<&|/l&>Admin Cc</&>:
+ <span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<&|/l&>Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people will receive future updates.</&>"></span>
</div>
<div class="value col-9">
<& /Elements/EmailInput,
@@ -224,13 +219,6 @@
&>
</div>
</div>
-
-<div class="form-row">
- <div class="label col-2"></div>
- <div class="value col-9">
- <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></i>
- </div>
-</div>
% }
% unless ( $SkipField{'Subject'} || $HideField{'Subject'} ) {
commit 7f3ce8e35af83cdcafef5a40a43f5983d695d9db
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu May 21 18:25:48 2020 -0500
Allow investigation queue to be selected
This commit updates the investigation on create element to allow
changing the investigation queue. Prior to this the queue was
tied to the selected incident and couldn't be changed.
Both selected incident and selected investigation now persist
through the reload by reading the InvestigationQueue arg on post.
If the user can't load the Queue then load one they can
SeeQueue and CreateTicket for.
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 17a2f8c7..9126cde9 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -414,10 +414,31 @@ Abort( loc("Queue '[_1]' could not be loaded.", $queue) );
}
# Load appropriate Investigations queue
-my $InvestigationsQueue = 'Investigations' . ( $constituency ? ' - ' . $constituency : '' );
+my $InvestigationsQueue = $ARGS{InvestigationQueue} || 'Investigations' . ( $constituency ? ' - ' . $constituency : '' );
my $InvestigationsQueueObj = RT::Queue->new( $session{'CurrentUser'} );
-my ($ret, $msg) = $InvestigationsQueueObj->Load( $InvestigationsQueue );
-RT->Logger->error("Unable to load $InvestigationsQueue : $msg") unless $ret;
+$InvestigationsQueueObj->Load( $InvestigationsQueue );
+
+# Users limited by constituency may not be able to use the default or specified investigations queue
+# Look up what queue the user has SeeQueue and CreateTicket for and use that instead.
+unless ( $InvestigationsQueueObj->Name ) {
+ RT->Logger->debug( "Investigation Queue '$InvestigationsQueue' could not be loaded for user " . $session{'CurrentUser'}->Id . "." );
+
+ my $investigation_queues = RT::Queues->new($session{'CurrentUser'});
+
+ $investigation_queues->Limit(
+ FIELD => 'Lifecycle',
+ OPERATOR => '=',
+ VALUE => RT::IR->lifecycle_investigation,
+ );
+
+ while (my $object = $investigation_queues->Next) {
+ # Ensure the user can CreateTicket in the queue
+ next unless $session{CurrentUser}->HasRight( Object => $object, Right => 'CreateTicket' );
+
+ $InvestigationsQueueObj = $object;
+ last;
+ }
+}
if( !RT::IR->IsIncidentQueue($QueueObj) ) {
RT::Interface::Web::Redirect(RT::IR->HREFTo( '/Create.html?' . $m->comp('/Elements/QueryString', %ARGS )));
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index c918b87a..fd38ecfa 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -46,7 +46,6 @@
%#
%# END BPS TAGGED BLOCK }}}
<input type="hidden" name="<% $NamePrefix %>Status" value="<% $ARGS{ $NamePrefix .'Status' } || $QueueObj->LifecycleObj->DefaultOnCreate %>" />
-<input type="hidden" class="hidden" name="<% $NamePrefix %>Queue" value="<% $QueueObj->Id %>" />
<div class="ticket-create-basics">
<&| /Widgets/TitleBox, title => loc("Basics"), class => 'ticket-info-basics' &>
@@ -67,7 +66,14 @@
<&|/l&>Queue</&>:
</div>
<div class="value col-9">
- <& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &>
+ <& /RTIR/Elements/SelectRTIRQueue,
+ Name => $NamePrefix . 'Queue',
+ Default => $QueueObj->Name,
+ Lifecycle => $QueueObj->Lifecycle,
+ AutoSubmit => 1,
+ ShowNullOption => 0,
+ Constituency => $Constituency
+ &>
</div>
</div>
commit 59b3cd0b40ee750c8d8ef4baa7fde2a8b30a10c4
Author: Aaron Trevena <ast at bestpractical.com>
Date: Fri Jun 12 15:46:03 2020 +0100
Reinstate "Incident"/"Launch Investigation" page menu
Reinstated tabbed switching view between incident and investigation
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 9126cde9..2948e018 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -47,6 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<& /RTIR/Elements/Header,
Title => $Title,
+ onload => "function () { hide('ticket-create-investigation') }",
&>
<& /Elements/Tabs &>
@@ -561,6 +562,21 @@ else {
$SubmitLabel = loc('Create');
}
+PageMenu->child(
+ incident => raw_html =>
+ q{<a href="#incident"}
+ . q{onclick="return switchVisibility('ticket-create-incident','ticket-create-investigation');"}
+ . q{>} . loc('Incident') . q{</a>}
+ );
+
+PageMenu->child(
+ investigation => raw_html =>
+ q[<a href="#investigation"]
+ . q[ onclick="return switchVisibility('ticket-create-investigation','ticket-create-incident');"]
+ . q[>] . loc('Launch Investigation') . q[</a>]
+ );
+
+
unless ( exists $ARGS{'Content'} ) {
my $Transactions;
if ( $SplitObj ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list