[Rt-commit] rtir branch, 3.4/fix-create-countermeasure, created. 3.3.0-168-g38db02e
Dustin Graves
dustin at bestpractical.com
Thu May 26 11:29:19 EDT 2016
The branch, 3.4/fix-create-countermeasure has been created
at 38db02ee0cd6bcc11dbad3a85ac9a2552784d60e (commit)
- Log -----------------------------------------------------------------
commit 34c29a14cc6cb566fd3e89853471ebff33b69502
Author: Dustin Graves <dustin at bestpractical.com>
Date: Thu May 26 15:19:35 2016 +0000
change rtir.js from Blocks->Countermeasures
diff --git a/static/js/rtir.js b/static/js/rtir.js
index c88f4c2..e4d997a 100644
--- a/static/js/rtir.js
+++ b/static/js/rtir.js
@@ -47,9 +47,9 @@ jQuery(function() {
showModal('investigations', this);
};
- var showBlocksModal = function(e) {
+ var showCountermeasuresModal = function(e) {
e.preventDefault();
- showModal('blocks', this);
+ showModal('countermeasures', this);
};
var showIncidentsModal = function(e) {
@@ -59,11 +59,11 @@ jQuery(function() {
jQuery('body').on('click', '#reports-create', showReportsModal);
jQuery('body').on('click', '#investigations-launch', showInvestigationsModal);
- jQuery('body').on('click', '#blocks-create', showBlocksModal);
+ jQuery('body').on('click', '#countermeasures-create', showCountermeasuresModal);
jQuery('body').on('click', '#incidents-create', showIncidentsModal);
jQuery('body').on('click', '#create-incident', showIncidentsModal);
jQuery('body').on('click', '.create_child_incident_reports', showReportsModal);
jQuery('body').on('click', '.create_child_investigations', showInvestigationsModal);
- jQuery('body').on('click', '.create_child_blocks', showBlocksModal);
+ jQuery('body').on('click', '.create_child_countermeasures', showCountermeasuresModal);
});
commit 38db02ee0cd6bcc11dbad3a85ac9a2552784d60e
Author: Dustin Graves <dustin at bestpractical.com>
Date: Thu May 26 15:28:26 2016 +0000
reuse existing RT::IR::TicketType function instead of rewriting logic
this has the added bonus of fixing the previous logic still using blocks
instead of countermeasures
diff --git a/html/RTIR/CreateInQueue.html b/html/RTIR/CreateInQueue.html
index e79f746..0729839 100644
--- a/html/RTIR/CreateInQueue.html
+++ b/html/RTIR/CreateInQueue.html
@@ -53,12 +53,8 @@
<& /RTIR/Elements/CreateInRTIRQueueModal, %ARGS &>
<%INIT>
-my $lifecycle_desc = $Lifecycle eq 'incidents' ? 'Incident' :
- $Lifecycle eq 'incident_reports' ? 'Incident Report' :
- $Lifecycle eq 'blocks' ? 'Block' :
- $Lifecycle eq 'investigations' ? 'Investigation' : '';
-
-my $title = "Select Queue for New $lifecycle_desc";
+my $ticket_type = RT::IR::TicketType( Lifecycle => $Lifecycle );
+my $title = "Select Queue for New $ticket_type";
</%INIT>
<%ARGS>
$Lifecycle
diff --git a/html/RTIR/Elements/CreateInRTIRQueueModal b/html/RTIR/Elements/CreateInRTIRQueueModal
index 764b953..0b9882e 100644
--- a/html/RTIR/Elements/CreateInRTIRQueueModal
+++ b/html/RTIR/Elements/CreateInRTIRQueueModal
@@ -52,7 +52,7 @@
% if ($Child) {
<input type="hidden" name="Child" value="<%$Child%>"/>
% }
- <&|/l_unsafe, $lifecycle_desc,
+ <&|/l_unsafe, $ticket_type,
$m->scomp('/RTIR/Elements/SelectRTIRQueue',
Name => 'Queue',
Lifecycle => $Lifecycle,
@@ -61,7 +61,7 @@
Constituency => $m->{'RTIR_ConstituencyFilter'} || $linked_constituency)
&>Create a new [_1] in the queue [_2]</&>
- <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled [_1] creation form.", $lifecycle_desc) &>
+ <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled [_1] creation form.", $ticket_type) &>
</form>
<%INIT>
$Lifecycle = $Lifecycle->[0] if (ref $Lifecycle eq 'ARRAY');
@@ -89,10 +89,7 @@ my $limit_to_constituency =
(RT::IR->StrictConstituencyLinking && $linked_constituency)
? 1:0;
-my $lifecycle_desc = $Lifecycle eq 'incidents' ? 'incident' :
- $Lifecycle eq 'incident_reports' ? 'incident report' :
- $Lifecycle eq 'blocks' ? 'block' :
- $Lifecycle eq 'investigations' ? 'investigation' : '';
+my $ticket_type = lc RT::IR::TicketType( Lifecycle => $Lifecycle );
</%INIT>
<%ARGS>
$Lifecycle
-----------------------------------------------------------------------
More information about the rt-commit
mailing list