Scarab commit: svn commit: r10814 - trunk/src: conf/classes conf/conf schema webapp/WEB-INF/templates/screens/admin webapp/WEB-INF/templates/screens/entry

Hussayn Dabbous <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2009-07-20 03:36:31-0700
New Revision: 10814

Modified:
   trunk/src/conf/classes/ScarabBundle_de.properties
   trunk/src/conf/classes/ScarabBundle_en.properties
   trunk/src/conf/conf/intake.xml
   trunk/src/schema/scarab-schema.xml
   trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm
   trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard3.vm

Log:
SCB2988

- added some l10n strings (for explanation messages)
- Added 2 booleans to RMOduleIssueType (intake and schema)
- modified The issue type editor to allow editing of the new booleans
- modified the entry wizzard to take care of the new booleans


Modified: trunk/src/conf/classes/ScarabBundle_de.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_de.properties?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/conf/classes/ScarabBundle_de.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_de.properties	2009-07-20 03:36:31-0700
@@ -225,6 +225,7 @@
 ActivitiesGeneratedBy = Änderungen durchgeführt von
 ActivityBetween     = zwischen
 ActivityAnd         = und
+Workflow=Workflow

 ##ButtonLabels
 Filter=Filter
@@ -702,6 +703,10 @@
 HideThisSection=<a href="{0}">Diesen Abschnitt ausblenden</a>
 CurrentModuleTypesIntroHidden�itor für <a href="{0}">modulübergreifende Suche einblenden</a>

+##Issuetype editor
+EnableWorkflowExplained�nutzer kontrollierter Workflow bei Neueingabe von Tickets
+EnableAttachmentsExplained=Attachments Abschnitt bei Neueingabe von Tickets
+
 ##Error
 StackTrace=Stack-Trace
 NoErrorMessage=Leider keine Fehlermeldung verfügbar.

Modified: trunk/src/conf/classes/ScarabBundle_en.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_en.properties?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/conf/classes/ScarabBundle_en.properties	(original)
+++ trunk/src/conf/classes/ScarabBundle_en.properties	2009-07-20 03:36:31-0700
@@ -218,6 +218,7 @@
 DisplaySizeExplained=visible field size (not internal field length!)
 DisplayStyle=Display Attribute
 DisplayStyleExplained=Extra Attribute (style='...'  or class='...'. NOTE: use only single quotes "'" !)
+Workflow=Workflow

 ## Email generation specific strings
 AutomaticIssue=Automatic Issue
@@ -780,6 +781,10 @@
 HideThisSection=<a href="{0}">Hide</a> the cross module list editor.
 CurrentModuleTypesIntroHidden=<a href="{0}">Show</a> the cross module list editor.

+##Issuetype editor
+EnableWorkflowExplained�d a user control-section to new issue-template
+EnableAttachmentsExplained�d an attachments section to new issue-template
+
 ##Error
 StackTrace=Stack Trace
 GenericError=An error has occurred.

Modified: trunk/src/conf/conf/intake.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/intake.xml?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/conf/conf/intake.xml	(original)
+++ trunk/src/conf/conf/intake.xml	2009-07-20 03:36:31-0700
@@ -264,6 +264,10 @@
         </field>
         <field name="DisplayDesc" key="desc" type="String" mapToProperty="DisplayDescription">
         <rule name="maxLength" value="255">DisplayDescriptionMustBeLessThan256Characters</rule>
+		
+		<field name="EnableAttachments" mapToProperty="EnableAttachments" key="attachments" type="boolean"/>
+		<field name="EnableWorkflow"    mapToProperty="EnableWorkflow"    key="workflow"    type="boolean"/>
+		
         </field>
 </group>


Modified: trunk/src/schema/scarab-schema.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/schema/scarab-schema.xml?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/schema/scarab-schema.xml	(original)
+++ trunk/src/schema/scarab-schema.xml	2009-07-20 03:36:31-0700
@@ -338,6 +338,10 @@
 		<column name="COMMENTS" required="false" default="5" type="INTEGER" javaType="primitive" description="Default number of comments."/>
 		<column name="DISPLAY_NAME" required="false" type="VARCHAR" size="255" description="Value that represents the name of the issue type in the UI."/>
 		<column name="DISPLAY_DESCRIPTION" required="false" type="VARCHAR" size="255" description="Value that represents the description of the issue type in the UI."/>
+
+		<column name="ENABLE_ATTACHMENTS" javaName="EnableAttachments" required="false" type="BOOLEANINT" default="1" javaType="primitive" />
+		<column name="ENABLE_WORKFLOW"    javaName="EnableWorkflow"    required="false" type="BOOLEANINT" default="1" javaType="primitive" />
+
 		<foreign-key foreignTable="SCARAB_MODULE">
 			<reference local="MODULE_ID" foreign="MODULE_ID"/>
 		</foreign-key>

Modified: trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/screens/admin/ArtifactTypeEdit.vm	2009-07-20 03:36:31-0700
@@ -5,9 +5,13 @@
 #set ($groups = $issueType.getAttributeGroups($module, false))
 #set ($rmit= $module.getRModuleIssueType($issueType))
 #set ($immutable = $issueType.SystemDefined)
+
+
 #if($immutable)
 <p class="infomark"><strong>$l10n.SystemSpecifiedIssueType</strong></p>
 #end
+
+
 <div class="app" id="div2-1-4-0">

 #if (!$issueTypeId && $issueTypeId.length() == 0)
@@ -22,6 +26,10 @@

 #else

+## =========================================================================+## Setup Issue Type display/edit form
+## =========================================================================+
 #set ($rmitGroup = $intake.RModuleIssueType.mapTo($rmit))
 #set ($modGroup = $intake.Module.mapTo($module))

@@ -31,13 +39,15 @@
 <input type="hidden" name="$scarabG.Constant.OTHER_TEMPLATE" value="admin,UserAttributeSelect.vm" />
 <input type="hidden" name="$scarabG.Constant.CANCEL_TEMPLATE" value="admin,ManageArtifactTypes.vm" />

+
 <div class="functnbar">
-#if (!$issueTypeLock && !$immutable)
-  <input type="submit" value="$l10n.Done"  name="eventSubmit_doDone" />&#160;
-#end
-<input type="submit" value="$l10n.Cancel"  name="eventSubmit_doCancel" />
+  #if (!$issueTypeLock && !$immutable)
+    <input type="submit" value="$l10n.Done"  name="eventSubmit_doDone" />&#160;
+  #end
+  <input type="submit" value="$l10n.Cancel"  name="eventSubmit_doCancel" />
 </div>

+
 <h3>$l10n.IssueTypeInfo</h3>
 <div class="axial">
   <table border="0" cellspacing="2" cellpadding="3">
@@ -81,7 +91,24 @@
       #end
     </td>
     </tr>
+
+    ## =================================================+    ## enable Attachments on new entry page
+    ## =================================================+
+    <tr>
+      <th>$l10n.Attachments</th>
+      <td>#booleanCheckbox($rmitGroup.EnableAttachments) ($l10n.EnableAttachmentsExplained)</td>
+    </tr>

+    ## =================================================+    ## enable user controlled workflow on new entry page
+    ## =================================================+
+    <tr>
+      <th>$l10n.Workflow</th>
+      <td>#booleanCheckbox($rmitGroup.EnableWorkflow) ($l10n.EnableWorkflowExplained)</td>
+    </tr>

     ## =================================================     ## Blocking when ...

Modified: trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard3.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard3.vm?view=diff&pathrev814&r1813&r2814
=============================================================================--- trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard3.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard3.vm	2009-07-20 03:36:31-0700
@@ -1,161 +1,175 @@
-#set ($issue = $scarabR.ReportingIssue)
-#set ($module = $issue.Module)
+#set ($issue     = $scarabR.ReportingIssue)
+#set ($module    = $issue.Module)
 #set ($issueType = $issue.IssueType)
+#set ($rmit      = $module.getRModuleIssueType($issueType))

 <div class="app" id="div2-1-0">

-<h3>$l10n.format("NewIssue", $module.getRModuleIssueType($issueType).DisplayName.toLowerCase())</h3>
+  <h3>$l10n.format("NewIssue", $rmit.DisplayName.toLowerCase())</h3>

-<form method="post" name="form" action="$link.setPage("entry,Wizard3.vm")" enctype="multipart/form-data">
-<input type="hidden" name="action" value="ReportIssue" />
+  <form method="post" name="form" action="$link.setPage("entry,Wizard3.vm")" enctype="multipart/form-data">
+    <input type="hidden" name="action" value="ReportIssue" />

-<input type="hidden" name="issueType" value="$issueType.IssueTypeId" />
+    <input type="hidden" name="issueType" value="$issueType.IssueTypeId" />

-#set ($moduleAttributeGroups = $issueType.getAttributeGroups($module, true))
-#set ($showTemplates = true)
-#if ($data.Parameters.getString("oldscreen"))
-  #set ($showTemplates = false)
-#end
-#entryTemplateAndAttributes ($issue $moduleAttributeGroups $l10n.SubmitIssue "eventSubmit_doEnterissue" $showTemplates)
-
-## ATTACHMENT
-#set ($atch = $scarabR.Attachment)
-#set ($intakeAttachment = $intake.Attachment.mapTo($atch))
-#set ($reportingIssue = $scarabR.ReportingIssue)
-#set ($attachments = $reportingIssue.Attachments)
-<h3>$l10n.Attachments</h3>
-#if ($attachments.size() > 0)
- <table width="100%" border="1" cellspacing="2" cellpadding="3">
-   <tr>
-     <th>$l10n.Select</th>
-     <th>$l10n.Name</th>
-     <th>$l10n.Description</th>
-     <th>$l10n.Type</th>
-   </tr>
-   #foreach ($file in $attachments)
-     #indexedRows($velocityCount)
-     #if ($file.TypeId.toString().equals("1"))
-       <td>
-         <input type="checkbox" name="file_delete_$velocityCount" />
-       </td>
-       <td>$file.File.Name</td>
-       <td>$file.Name</td>
-       <td>$file.MimeType</td>
-     </tr>
-     #end
-   #end
- </table>
-
-<div class="functnbar3">
-  <input type="submit" value="$l10n.Delete" name="eventSubmit_doRemovefile" />
-</div>
-#end
-
-<h4>$l10n.AddAttachment</h4>
-<div class="colbar">
-*&nbsp;$l10n.format("AttachmentFieldRequired", $l10n.Path)
-</div>
+    #set ($moduleAttributeGroups = $issueType.getAttributeGroups($module, true))
+    #set ($showTemplates = true)
+    #if ($data.Parameters.getString("oldscreen"))
+      #set ($showTemplates = false)
+    #end
+    #entryTemplateAndAttributes ($issue $moduleAttributeGroups $l10n.SubmitIssue "eventSubmit_doEnterissue" $showTemplates)

-<div class="axial">
-  <table cellpadding="3" cellspacing="2" border="0" width="100%">
-    <tr>
-      <th>$l10n.Path</th>
-      <td>
-       <input type="file" name="$intakeAttachment.File.Key" size="45"
-            value="$!intakeAttachment.File.Value.FileName" />
-       #fieldErrorMsg($intakeAttachment.File "")
-       <p><small>$l10n.SelectFile</small></p>
-      </td>
-    </tr>
-    <tr>
-      <th>*&nbsp;$l10n.Description</th>
-      <td>
-       #textAreaMedium("$intakeAttachment.Name.Key" "$intakeAttachment.Name")
-       #fieldErrorMsg($intakeAttachment.Name "")
-      </td>
-    </tr>
-    <tr>
-      <th>*&nbsp;$l10n.Type</th>
-      <td>
-        <select name="$intakeAttachment.MimeTypeA.Key" class="select">
-        #if ($intakeAttachment.MimeTypeA)
-          #set ($mimeA = $intakeAttachment.MimeTypeA.toString())
+    ## ATTACHMENT
+    #set ($atch = $scarabR.Attachment)
+    #set ($intakeAttachment = $intake.Attachment.mapTo($atch))
+    #set ($reportingIssue = $scarabR.ReportingIssue)
+    #set ($attachments = $reportingIssue.Attachments)
+    <h3>$l10n.Attachments</h3>
+    #if ($attachments.size() > 0)
+      <table width="100%" border="1" cellspacing="2" cellpadding="3">
+        <tr>
+          <th>$l10n.Select</th>
+          <th>$l10n.Name</th>
+          <th>$l10n.Description</th>
+          <th>$l10n.Type</th>
+        </tr>
+        #foreach ($file in $attachments)
+          #indexedRows($velocityCount)
+          #if ($file.TypeId.toString().equals("1"))
+            <td>
+              <input type="checkbox" name="file_delete_$velocityCount" />
+            </td>
+            <td>$file.File.Name</td>
+            <td>$file.Name</td>
+           <td>$file.MimeType</td>
+          </tr>
+          #end
         #end
-         #mimeTypeOptions($mimeA)
-        </select>
-        <p><small>$l10n.Other &#160;
-        <input type="text" name="$intakeAttachment.MimeTypeB.Key"
-                          value="$intakeAttachment.MimeTypeB" />$l10n.CloseParenth</small></p>
-        #fieldErrorMsg($intakeAttachment.MimeTypeA "")
-      </td>
-    </tr>
-  </table>
-</div>
-
-<div class="functnbar3">
-  <input type="submit" value="$l10n.AddAttachment" name="eventSubmit_doAddfile" />
-</div>
+      </table>
+      <div class="functnbar3">
+        <input type="submit" value="$l10n.Delete" name="eventSubmit_doRemovefile" />
+      </div>
+    #end

-<h4>$l10n.SubmitNewIssue</h4>

-  <div class="axial">
-  <table width="100%" cellpadding="3" cellspacing="2" border="1">
+    ## =========================================================================+    ## The Attachments section can be enable in the IssueType editor
+    ## =========================================================================+    #if ($rmit.EnableAttachments)
+      <h4>$l10n.AddAttachment</h4>
+      <div class="colbar">
+        *&nbsp;$l10n.format("AttachmentFieldRequired", $l10n.Path)
+      </div>
+
+      <div class="axial">
+        <table cellpadding="3" cellspacing="2" border="0" width="100%">
+          <tr>
+            <th>$l10n.Path</th>
+            <td>
+              <input type="file" name="$intakeAttachment.File.Key" size="45"
+                     value="$!intakeAttachment.File.Value.FileName" />
+              #fieldErrorMsg($intakeAttachment.File "")
+              <p><small>$l10n.SelectFile</small></p>
+            </td>
+          </tr>
+          <tr>
+            <th>*&nbsp;$l10n.Description</th>
+            <td>
+              #textAreaMedium("$intakeAttachment.Name.Key" "$intakeAttachment.Name")
+              #fieldErrorMsg($intakeAttachment.Name "")
+            </td>
+          </tr>
+          <tr>
+            <th>*&nbsp;$l10n.Type</th>
+            <td>
+              <select name="$intakeAttachment.MimeTypeA.Key" class="select">
+                #if ($intakeAttachment.MimeTypeA)
+                  #set ($mimeA = $intakeAttachment.MimeTypeA.toString())
+                #end
+                #mimeTypeOptions($mimeA)
+              </select>
+              <p><small>$l10n.Other &#160;
+              <input type="text" name="$intakeAttachment.MimeTypeB.Key"
+                                value="$intakeAttachment.MimeTypeB" />$l10n.CloseParenth</small></p>
+              #fieldErrorMsg($intakeAttachment.MimeTypeA "")
+            </td>
+          </tr>
+        </table>
+      </div>
+
+      <div class="functnbar3">
+        <input type="submit" value="$l10n.AddAttachment" name="eventSubmit_doAddfile" />
+      </div>
+    #end

     #set ($intakeAttachment = $intake.Attachment.setKey("_1") )
-    #set ($reasonIsVisible  = $module.isIssueReasonVisible()  )
-    #if ($reasonIsVisible)
-      #set ($reasonIsRequired = $module.isIssueReasonRequired() )
-      <tr>
-        <th nowrap="nowrap">
-          #if ($reasonIsRequired)
-            #showAsterisk()
+
+    ## =========================================================================+    ## User controllabe Workflow can be enable in the IssueType editor
+    ## =========================================================================+    #if ($rmit.EnableWorkflow)
+      <h4>$l10n.SubmitNewIssue</h4>
+
+      <div class="axial">
+        <table width="100%" cellpadding="3" cellspacing="2" border="1">
+
+          #set ($reasonIsVisible  = $module.isIssueReasonVisible()  )
+          #if ($reasonIsVisible)
+            #set ($reasonIsRequired = $module.isIssueReasonRequired() )
+            <tr>
+              <th nowrap="nowrap">
+                #if ($reasonIsRequired)
+                  #showAsterisk()
+                #end
+                $l10n.Reason
+              </th>
+              <td>
+                #if ($reasonIsRequired)
+                  #fieldErrorMsg($intakeAttachment.Data "")
+                  <p><small><strong>$l10n.MissedRequired1</strong> $l10n.MissedRequired2</small></p>
+                #end
+                #textAreaMedium("$intakeAttachment.Data.Key" $intakeAttachment.Data)
+                #fieldErrorMsg($intakeAttachment.Data "")
+              </td>
+            </tr>
           #end
-          $l10n.Reason
-        </th>
-        <td>
-          #if ($reasonIsRequired)
-            #fieldErrorMsg($intakeAttachment.Data "")
-            <p><small><strong>$l10n.MissedRequired1</strong> $l10n.MissedRequired2</small></p>
+
+          #set ($userPref = $data.User.EnterIssueRedirect)
+          #if (!$userPref)
+            #set ($userPref = 2)
           #end
-          #textAreaMedium("$intakeAttachment.Data.Key" $intakeAttachment.Data)
-          #fieldErrorMsg($intakeAttachment.Data "")
-        </td>
-      </tr>
-    #end

-    #set ($userPref = $data.User.EnterIssueRedirect)
-    #if (!$userPref)
-      #set ($userPref = 2)
+          <tr>
+            <th width="120">$l10n.AfterSubmit</th>
+            <td><select name="template_code">
+            <option value="1"
+              #if ($userPref == 1) selected="selected" #end>$l10n.EnterNewIssue</option>
+              #if (($scarabR.hasPermission($scarabG.Permission.ISSUE__ASSIGN, $module))
+                    && (!$module.getUserAttributes($issueType).isEmpty()))
+                <option value="2"
+                  #if ($userPref == 0 || $userPref == 2) selected="selected" #end>$l10n.AssignIssue</option>
+              #end
+              <option value="3"
+                #if ($userPref == 3) selected="selected" #end>$l10n.ViewThisIssue</option>
+              <option value="5"
+                #if ($userPref == 5) selected="selected" #end>$l10n.AddInitialComment</option>
+              <option value="4"
+                #if ($userPref == 4) selected="selected" #end>$l10n.ReturnToHome</option>
+            </select></td>
+          </tr>
+        </table>
+      </div>
+    #else
+      <input type="hidden" name="template_code" value="3"/>
     #end

-<tr>
-<th width="120">$l10n.AfterSubmit</th>
-<td><select name="template_code">
-<option value="1"
-  #if ($userPref == 1) selected="selected" #end>$l10n.EnterNewIssue</option>
-#if (($scarabR.hasPermission($scarabG.Permission.ISSUE__ASSIGN, $module))
-     && (!$module.getUserAttributes($issueType).isEmpty()))
-  <option value="2"
-  #if ($userPref == 0 || $userPref == 2) selected="selected" #end>$l10n.AssignIssue</option>
-#end
-<option value="3"
-  #if ($userPref == 3) selected="selected" #end>$l10n.ViewThisIssue</option>
-<option value="5"
-  #if ($userPref == 5) selected="selected" #end>$l10n.AddInitialComment</option>
-<option value="4"
-  #if ($userPref == 4) selected="selected" #end>$l10n.ReturnToHome</option>
-</select></td>
-</tr>
-</table>
-</div>
-
-#if (!$moduleAttributeGroups.isEmpty())
-<div class="functnbar2">
-<input type="submit" value="$l10n.SubmitIssue"  name="eventSubmit_doEnterissue" />&#160;
-<input type="reset" value="$l10n.Reset" name="eventSubmit_doRefresh" />&#160;
-</div>
-#end
+    #if (!$moduleAttributeGroups.isEmpty())
+      <div class="functnbar2">
+        <input type="submit" value="$l10n.SubmitIssue"  name="eventSubmit_doEnterissue" />&#160;
+        <input type="reset" value="$l10n.Reset" name="eventSubmit_doRefresh" />&#160;
+      </div>
+    #end

-$intake.declareGroups()
-</form>
+    $intake.declareGroups()
+  </form>
 </div>

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2372552
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.