[Rt-commit] rtir branch, 5.0/restore-incidents-and-investigations-on-create, repushed

Blaine Motsinger blaine at bestpractical.com
Tue May 19 14:05:52 EDT 2020


The branch 5.0/restore-incidents-and-investigations-on-create was deleted and repushed:
       was 78635159cfbffda0bac4ff0544bbb8746e1e6b40
       now 9fe4c2c520ab2d7df911e6dbf9e451d3e4f10509

1: 990ea293 ! 1: ebc13027 Core RT::Extension::CreateIncidentAndInvestigation
    @@ -20,7 +20,7 @@
     +<& /RTIR/Investigation/Elements/Create,
     +    %ARGS,
     +    NamePrefix => 'Investigation',
    -+    QueueObj => $investigations_queue_obj,
    ++    QueueObj => $InvestigationsQueueObj,
     +    Lifecycle => RT::IR->lifecycle_investigation,
     +    Constituency => $constituency,
     +    SkipField => { Owner => 1, Attachments => 1, DateFields => 1 },
    @@ -36,11 +36,10 @@
       }
      
     +# Load appropriate Investigations queue
    -+my $investigations_queue = defined RT->Config->Get('DefaultInvestigationsQueue') ?
    -+    RT->Config->Get('DefaultInvestigationsQueue') : 'Investigations';
    -+my $investigations_queue_obj = RT::Queue->new( $session{'CurrentUser'} );
    -+my ($ret, $msg) = $investigations_queue_obj->Load( $investigations_queue );
    -+RT::Logger->error("Unable to load $investigations_queue : $msg") unless $ret;
    ++my $InvestigationsQueue = 'Investigations';
    ++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 )));
2: 78635159 ! 2: 9fe4c2c5 Migrate Investigation/Elements/Create to elevator themes
    @@ -1,6 +1,6 @@
     Author: Blaine Motsinger <blaine at bestpractical.com>
     
    -    WIP - Migrate to elevator-light theme
    +    Migrate Investigation/Elements/Create to elevator themes
     
     diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
     --- a/html/RTIR/Investigation/Elements/Create
    @@ -72,17 +72,6 @@
     +<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') || '',
    -+    &>
    -+  </div>
    -+</div>
    -+<div class="form-row">
    -+  <div class="label col-3">
    -+    <&|/l&>Time Left</&>:
     +  </div>
     +  <div class="value col-9">
     +    <& /Elements/EditTimeValue,
    @@ -100,6 +89,17 @@
     +    &>
     +  </div>
     +</div>
    ++<div class="form-row">
    ++  <div class="label col-3">
    ++    <&|/l&>Time Left</&>:
    ++  </div>
    ++  <div class="value col-9">
    ++    <& /Elements/EditTimeValue,
    ++        Name    => $NamePrefix . 'TimeWorked',
    ++        Default => $value_cb->('TimeWorked') || '',
    ++    &>
    ++  </div>
    ++</div>
      % }
      
      % unless ( $SkipField{'DateFields'} ) {
    @@ -154,14 +154,196 @@
      <& /Elements/EditCustomFieldCustomGroupings,
     @@
      
    - </div>
    - 
    -+% # !!!!!!! HERE !!!!!!!
    -+
      <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">
    +-<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-md-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 );



More information about the rt-commit mailing list