Scarab commit: svn commit: r10819 - trunk: src/java/org/tigris/scarab/om src/java/org/tigris/scarab/tools src/webapp/WEB-INF/templates/viewIssue xdocs
Hussayn Dabbous <[email protected]>
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dabbous
Date: 2009-07-22 06:36:38-0700
New Revision: 10819
Modified:
trunk/src/java/org/tigris/scarab/om/Issue.java
trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java
trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
trunk/xdocs/scarab_properties.xml
Log:
SCB2989:
I moved access methods to Scarab status information from Issue to ScarabGlobalTool
I did this to allow issue independent access to the information. We have now:
ScarabGlobalTool.getStatusAttributeName();
ScarabGlobalTool.getOnHoldAttributeOptionValue();
ScarabGlobalTool.getOnHoldExpirationDateAttributeName();
I also added the new System properties:
scarab.common.status.onhold (the name of the onhold AttributeOption)
scarab.common.status.onhold.dateProperty (the name of the expire Property for onhold issues)
Modified: trunk/src/java/org/tigris/scarab/om/Issue.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/Issue.java?view=diff&pathrev=10819&r1=10818&r2=10819
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/Issue.java (original)
+++ trunk/src/java/org/tigris/scarab/om/Issue.java 2009-07-22 06:36:38-0700
@@ -4327,7 +4327,7 @@
public boolean isSealed() throws TorqueException
{
boolean result = false;
- String status = getProperty("scarab.common.status.id", null);
+ String status = ScarabGlobalTool.getStatusAttributeName();
if (status != null)
{
String value = getProperty("scarab.common.status.sealed", null);
@@ -4356,10 +4356,10 @@
public boolean isOnHold() throws TorqueException
{
boolean result = false;
- String status = getProperty("scarab.common.status.id", null);
+ String status = ScarabGlobalTool.getStatusAttributeName();
if (status != null)
{
- String value = getProperty("scarab.common.status.onhold", null);
+ String value = ScarabGlobalTool.getOnHoldAttributeOptionValue();
if(value != null)
{
AttributeValue attval = getAttributeValue(status);
@@ -4373,6 +4373,42 @@
}
/**
+ * Returns the attribute instance, which contains the issues status.
+ * Note: Currently Scarab expects that the Attribute is a drop down list
+ * (i.e. its data type is AttributeOptionValue)
+ * @return
+ * @throws TorqueException
+ */
+ public Attribute getMyStatusAttribute() throws TorqueException
+ {
+ Attribute attribute = null;
+ String attributeName = ScarabGlobalTool.getStatusAttributeName();
+ if(attributeName != null)
+ {
+ attribute = Attribute.getInstance(attributeName);
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns the attribute instance, which contains the issues onHoldExpirationDate.
+ * Note: Currently Scarab expects that the Attribute is a DateAttribute
+ * @return
+ * @throws TorqueException
+ */
+ public Attribute getMyOnHoldExpirationDate() throws TorqueException
+ {
+ Attribute attribute = null;
+ String attributeName = ScarabGlobalTool.getOnHoldExpirationDateAttributeName();
+ if(attributeName != null)
+ {
+ attribute = Attribute.getInstance(attributeName);
+ }
+ return attribute;
+ }
+
+
+ /**
* Get the date until which this issue is onhold. This method searches
* for the attribute specified by the system property "scarab.common.status.onhold.dateProperty"
* And we expect this attribute to contain a Date value.
@@ -4383,7 +4419,7 @@
public Date getOnHoldUntil() throws TorqueException, ParseException
{
Date date = null;
- String attributeName = getProperty("scarab.common.status.onhold.dateProperty", null);
+ String attributeName = ScarabGlobalTool.getOnHoldExpirationDateAttributeName();
if (attributeName != null)
{
@@ -4399,6 +4435,7 @@
}
return date;
}
+
/**
Modified: trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java?view=diff&pathrev=10819&r1=10818&r2=10819
==============================================================================
--- trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java (original)
+++ trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java 2009-07-22 06:36:38-0700
@@ -470,6 +470,51 @@
return WorkflowFactory.getInstance();
}
+
+ /**
+ * Return the value of the AttributeOption which expresses, that the
+ * issue is "onhold". This directly corresponds to the system property
+ *
+ * "scarab.common.status.onhold"
+ *
+ * If that property is not set or set to empty, then this method returns null.
+ * @return
+ */
+ public static String getOnHoldAttributeOptionValue() {
+ String value = getTurbineProperty("scarab.common.status.onhold", null);
+ return value;
+ }
+
+ /**
+ * Return the name of the Attribute which is interpreted as Issue-"status".
+ * This directly corresponds to the system property
+ *
+ * "scarab.common.status.id"
+ *
+ * If that property is not set or set to empty, then this method returns null.
+ * @return
+ */
+ public static String getStatusAttributeName()
+ {
+ String status = getTurbineProperty("scarab.common.status.id", null);
+ return status;
+ }
+
+ /**
+ * Return the name of the Attribute which is interpreted as the expiration date
+ * for an issue which is "onhold". This directly corresponds to the system property
+ *
+ * "scarab.common.status.onhold.dateProperty"
+ *
+ * If that property is not set or set to empty, then this method returns null.
+ * @return
+ */
+ public static String getOnHoldExpirationDateAttributeName() {
+ String attributeName = getTurbineProperty("scarab.common.status.onhold.dateProperty", null);
+ return attributeName;
+ }
+
+
/**
* Returns a List of users based on the given search criteria. This method
* is an overloaded function which returns an unsorted list of users.
@@ -961,7 +1006,7 @@
/**
* @return Return the current turbine configuration with all keys included
*/
- public Configuration getTurbineConfiguration()
+ public static Configuration getTurbineConfiguration()
{
return Turbine.getConfiguration();
}
@@ -984,26 +1029,36 @@
* @return Returns the string value of a turbine property. If the property
* does not map to a String, return Object.toString() instead.
*/
- public String getTurbineProperty(String key)
+ public static String getTurbineProperty(String key)
+ {
+ return getTurbineProperty(key, null);
+ }
+
+ private static String getTurbineProperty(String key, String def)
{
String result = null;
try
{
- result = getTurbineConfiguration().getString(key);
+ result = getTurbineConfiguration().getString(key);
}
catch( ConversionException ce)
{
- // This happens, if the Turbine Property contains data, which can
- // not be converted to a String. This has been seen on JBOSS.
- // Note: getProperty() does not resolve ${} values, so it is not an
- // option to use it instead of getString(). But in the case of
- // non convertible objects, getProperty().toString() is the best bet.
- // In my opinion this should be handled inside of Configuration,
- // or at least we should be given a test method Configuration.isString(key)
- // So we could avoid this stuff here...
- // just my 2 cents. (hussayn dabbous)
- result = getTurbineConfiguration().getProperty(key).toString();
+ // This happens, if the Turbine Property contains data, which can
+ // not be converted to a String. This has been seen on JBOSS.
+ // Note: getProperty() does not resolve ${} values, so it is not an
+ // option to use it instead of getString(). But in the case of
+ // non convertible objects, getProperty().toString() is the best bet.
+ // In my opinion this should be handled inside of Configuration,
+ // or at least we should be given a test method Configuration.isString(key)
+ // So we could avoid this stuff here...
+ // just my 2 cents. (hussayn dabbous)
+ result = getTurbineConfiguration().getProperty(key).toString();
+ }
+ if(result == null)
+ {
+ result = def;
}
return result;
}
+
}
Modified: trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm?view=diff&pathrev=10819&r1=10818&r2=10819
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm 2009-07-22 06:36:38-0700
@@ -1,6 +1,225 @@
#set ($canAddComment = $scarabR.hasPermission($scarabG.Permission.ISSUE__COMMENT, $module) && $rmit.Active)
#set ($wantEdit = $scarabU.wantEdit($user,$currentIssue,$data))
#set ($isEditAttributes = $canEdit && $wantEdit)
+#set ($currentRow = 0)
+#set ($currentColumn = 0)
+
+## =======================================================================================
+## MACRO SECTION
+## =======================================================================================
+
+#macro (displayAttributeInCanvas $att $colspan)
+
+ ## =================================================================
+ ## Note that this macro depends on 2 global variables:
+ ##
+ ## $currentRow CurrentRow Counter (may be 0, if no row has been created yet)
+ ## $currentColumn Number of items which are ALLREADY rendered into the current Row
+ ##
+ ## if ($currentRow == 0) We are right at the begin of the data list
+ ## if ($currentColumn == 0) There is no item in the current Row
+ ## =================================================================
+
+ #set ($rma = $module.getRModuleAttribute($att, $issueType))
+ #if ($rma.Active)
+
+
+ ## define $attVal
+ ## define $attrInput
+ #set ($attVal = $attrValues.get($att.getName().toUpperCase()))
+ #set ($attrInput = $intake.AttributeValue.mapTo($attVal))
+
+ ## define $field
+ #if ($att.AttributeType.ValidationKey)
+ #set ($field = $attVal.Attribute.AttributeType.ValidationKey)
+ #elseif ($att.isOptionAttribute())
+ #set ($field = "OptionId")
+ #else
+ #set ($field = "Value")
+ #end
+
+ ## define $fieldSize
+ ## define $fieldHint
+ ## define $fieldStyle
+ #set ($fieldSize = 0)
+ #set ($fieldSize = $!attVal.Attribute.FieldSize)
+ #set ($fieldHint = "")
+ #set ($fieldHint = $!attVal.Attribute.Hint)
+ #set ($fieldStyle = "")
+ #set ($fieldStyle = $!attVal.Attribute.Style)
+
+ ## define $display
+ ## refine $fieldStyle
+ #set ($display = true)
+ #set ($isOptionAttr = $attVal.Attribute.isOptionAttribute())
+ #if ($isOptionAttr)
+ #set ($fieldStyle = $!attVal.AttributeOption.Style)
+ #if ($attVal.AttributeOption.Deleted.toString().equals("true"))
+ #set ($display = false)
+ #end
+ #end
+
+ ## define $fieldExtraHeader
+ #set ($fieldExtraHeader = "")
+ #if ($!attVal.Attribute.Description.startsWith("hint:"))
+ #set ($fieldExtraHeader = "$!attVal.Attribute.Description.substring(5)")
+ #end
+
+ ## define $isHidden
+ ## define $displayValue
+ ## define $onSameLine
+ #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible ) )
+ #set ($index = $rma.DisplayValue.indexOf("append:") + 7)
+ #if ($index > 6)
+ #set ($displayValue = $rma.DisplayValue.substring($index))
+ #set ($onSameLine = true)
+ #set ($currentColumn = $currentColumn + 1)
+ #else
+ #set ($displayValue = $rma.DisplayValue)
+ #set ($onSameLine = false)
+ #set ($currentColumn = 1)
+ #set ($currentRow = $currentRow + 1)
+ #end
+
+
+ #if ($isEditAttributes)
+
+ #if ($onSameLine)
+ #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible || $currentColumn==1 ) )
+ #if ($currentRow==0)
+ <tr id="${displayValue}:Container" #if ($isHidden) style="visibility:hidden;" #end>
+ <th style="text-align:right;">
+ #else
+ <span id="${displayValue}:Container" #if ($isHidden) style="display:none;" #end>
+ #end
+ <span class="displayValue" style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;">#drawRequiredMarkupAsNeeded($user $currentIssue $att)$displayValue</span>
+ #if ($currentRow==0)
+ </th>
+ <td colspan="$colspan">
+ #end
+ #else
+ #if ($currentRow > 1)
+ </td>
+ </tr>
+ #end
+ <tr>
+ <th style="text-align:right;">
+ <span style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;">#drawRequiredMarkupAsNeeded($user $currentIssue $att)$displayValue</span>
+ #if($fieldExtraHeader)
+ <pre>$fieldExtraHeader</pre>
+ #end
+ </th>
+ <td colspan="$colspan">
+ #set ($newline = false)
+ #end
+ <span style="display:inline;margin-left:0px; margin-right:10px;">
+ #if ($att.isOptionAttribute())
+ #attrValueLeafSelect ($attVal $field "" false $attVal.isRequired())
+ #attrValueErrorMsg ($attVal $field)
+ #elseif ($att.isIntegerAttribute())
+ #attrValueErrorMsg($attVal "NumericValue")
+ #attrValueText($attVal $attrInput.NumericValue $fieldSize $fieldHint)
+ #else
+ #attrValueErrorMsg($attVal "Value")
+ #attrValueText($attVal $attrInput.Value $fieldSize $fieldHint)
+ #end
+ </span>
+ #if ($onSameLine)
+ </span>
+ #end
+
+ #elseif ($attVal.isSet())
+ #if ($display)
+ #if ($onSameLine)
+ #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible || $currentColumn==1 ) )
+ #if ($currentRow==0)
+ <tr id="${displayValue}:Container" #if ($isHidden) style="visibility:hidden;" #end>
+ <th style="text-align:right;">
+ #else
+ <span id="${displayValue}:Container" #if ($isHidden) style="display:none;" #end>
+ #end
+ <span class="displayValue" style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;">$displayValue</span>
+ #if ($currentRow==0)
+ </th>
+ <td colspan="$colspan">
+ #end
+ #else
+ #if ($currentRow > 1)
+ </td>
+ </tr>
+ #end
+ <tr>
+ <th style="text-align:right;">
+ <span style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;">$displayValue</span>
+ #if($fieldExtraHeader)
+ <pre>$fieldExtraHeader</pre>
+ #end
+ </th>
+ <td $fieldStyle colspan="$colspan">
+ #set ($newline = false)
+ #end
+ <span style="display:inline;margin-left:0px; margin-right:10px;">
+ #if ($att.isOptionAttribute())
+ #if (!$attVal.AttributeOption)
+ --
+ #else
+ #if ($module.getRModuleOption($attVal.AttributeOption, $issueType).Active)
+ $!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
+ #else
+ [I]$!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
+ #end
+ #end
+ #elseif ($att.AttributeType.Name == "long-string")
+ ## Convert the raw text to formatted HTML before
+ ## displaying it.
+ $!scarabG.textToHTML($attrInput.Value.toString(), $link, $scarabR.CurrentModule)
+ #elseif ($att.isIntegerAttribute())
+ #attrValueErrorMsg($attVal "NumericValue")
+ #attrValueText($attVal $attrInput.NumericValue $fieldSize $fieldHint)
+ #elseif ($att.AttributeType.Name == "date")
+ $scarabR.formatDate($!attrInput.Value.value)
+ #elseif ($att.AttributeType.Name == "integer")
+ $!attrInput.NumericValue.value
+ #else
+ ## Just output the raw value directly.
+ $!attrInput.Value
+ #end
+ </span>
+ #if ($onSameLine)
+ </span>
+ #end
+ #end
+ #end
+
+ #else
+ #set ($allAttrValues = $currentIssue.getModuleAttributeValuesMap(false))
+ #set ($attVal = $allAttrValues.get($att.getName().toUpperCase()))
+ #set ($attrInput = $intake.AttributeValue.mapTo($attVal))
+ #set ($isOptionAttr = $attVal.Attribute.isOptionAttribute())
+ #if ($attVal.isSet() && (!$attrInput.Value.toString().trim().equals("") || !$attrInput.NumericValue))
+ <tr>
+ <th>[I] $rma.DisplayValue</th>
+ <td colspan="$colspan">
+ #if ($isOptionAttr)
+ #if ($module.getRModuleOption($attVal.AttributeOption, $issueType).Active)
+ $!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
+ #else
+ [I]$!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
+ #end
+ #elseif ($att.AttributeType.Name == "integer")
+ $!attrInput.NumericValue.value
+ #else
+ $!attrInput.Value
+ #end
+ </td>
+ </tr>
+ #end
+ #end
+#end
+
+## =========================================================================================
+## Canvas Section
+## =========================================================================================
<h3 onClick=smartToggleVisibility('properties')><img name="properties.state" src="$staticLink.setPath($iconCollapse)"/>$l10n.IssueAttributesNavi</h3>
<div id='properties'>
@@ -26,13 +245,21 @@
<div class="group">
<table>
<tr>
- <th>$currentIssue.RModuleIssueType.DisplayName</th>
+ <th style="text-align:right;">$currentIssue.RModuleIssueType.DisplayName</th>
<td>$currentIssue.UniqueId</td>
</tr>
<tr>
- <th>$assignedRMA.DisplayValue</th>
+ <th style="text-align:right;">$assignedRMA.DisplayValue</th>
<td> #assignedUsers( $myself $isEditAttributes )</td>
</tr>
+ #set ($myStatusAttribute = $currentIssue.MyStatusAttribute)
+ #if ($myStatusAttribute)
+ ## tell the macro where we are in the table and then execute it
+ #set ($currentRow=0)
+ #set ($currentColumn=0)
+ #displayAttributeInCanvas ($myStatusAttribute 1)
+ </td></tr>
+ #end
</table>
</div>
@@ -40,13 +267,21 @@
<div class="group">
<table>
<tr>
- <th>$l10n.DateCommitted</th>
+ <th style="text-align:right;">$l10n.DateCommitted</th>
#userTimeStamp_td( $currentIssue.CreatedBy $currentIssue.CreatedDate)
</tr>
<tr>
- <th>$l10n.LastModified</th>
+ <th style="text-align:right;">$l10n.LastModified</th>
#userTimeStamp_td( $currentIssue.ModifiedBy $currentIssue.ModifiedDate)
</tr>
+ #set ($myOnHoldExpirationDate = $currentIssue.MyOnHoldExpirationDate)
+ #if ($myOnHoldExpirationDate)
+ ## tell the macro where we are in the table and then execute it
+ #set ($currentRow=0)
+ #set ($currentColumn=1)
+ #displayAttributeInCanvas ($myOnHoldExpirationDate 2)
+ </td></tr>
+ #end
</table>
</div>
@@ -82,169 +317,21 @@
<h4>$group.Name #if ($isEditAttributes)#asterisk()#end</h4>
<table cellpadding="3" cellspacing="2" border="0" width="100%">
#set ($appendToNextLine = "")
- #set ($linecount = 0)
- #foreach ($att in $attributes)
- #set ($rma = $module.getRModuleAttribute($att, $issueType))
- #if ($rma.Active)
-
- #set ($attVal = $attrValues.get($att.getName().toUpperCase()))
- #set ($attrInput = $intake.AttributeValue.mapTo($attVal))
-
- #if ($att.AttributeType.ValidationKey)
- #set ($field = $attVal.Attribute.AttributeType.ValidationKey)
- #elseif ($att.isOptionAttribute())
- #set ($field = "OptionId")
- #else
- #set ($field = "Value")
- #end
-
- #set ($fieldSize = 0)
- #set ($fieldSize = $!attVal.Attribute.FieldSize)
- #set ($fieldHint = "")
- #set ($fieldHint = $!attVal.Attribute.Hint)
- #set ($fieldStyle = "")
- #set ($fieldStyle = $!attVal.Attribute.Style)
-
- #set ($fieldExtraHeader = "")
- #if ($!attVal.Attribute.Description.startsWith("hint:"))
- #set ($fieldExtraHeader = "$!attVal.Attribute.Description.substring(5)")
- #end
-
- #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible ) )
- #set ($index = $rma.DisplayValue.indexOf("append:") + 7)
- #if ($linecount > 0 && $index > 6)
- #set ($displayValue = $rma.DisplayValue.substring($index))
- #else
- #set ($displayValue = $rma.DisplayValue)
- #end
- #set ($display = true)
- #set ($isOptionAttr = $attVal.Attribute.isOptionAttribute())
- #if ($isOptionAttr)
- #set ($fieldStyle = $!attVal.AttributeOption.Style)
- #if ($attVal.AttributeOption.Deleted.toString().equals("true"))
- #set ($display = false)
- #end
- #end
-
- #if ($isEditAttributes)
-
- #if ($linecount > 0 && $index > 6)
- #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible ) )
- <span id="${displayValue}:Container" #if ($isHidden) style="display:none;" #end>
- <span class="displayValue" style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;width:95%;">#drawRequiredMarkupAsNeeded($user $currentIssue $att)$displayValue</span>
- #else
- #if ($linecount > 0)
- </td>
- </tr>
- #end
- #set ($linecount = $linecount + 1)
- <tr>
- <th>
- <span style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;width:95%;">#drawRequiredMarkupAsNeeded($user $currentIssue $att)$displayValue</span>
- #if($fieldExtraHeader)
- <pre>$fieldExtraHeader</pre>
- #end
- </th>
- <td>
- #set ($newline = false)
- #end
- <span style="display:inline;margin-left:0px; margin-right:10px;width:95%;">
- #if ($att.isOptionAttribute())
- #attrValueLeafSelect ($attVal $field "" false $attVal.isRequired())
- #attrValueErrorMsg ($attVal $field)
- #elseif ($att.isIntegerAttribute())
- #attrValueErrorMsg($attVal "NumericValue")
- #attrValueText($attVal $attrInput.NumericValue $fieldSize $fieldHint)
- #else
- #attrValueErrorMsg($attVal "Value")
- #attrValueText($attVal $attrInput.Value $fieldSize $fieldHint)
- #end
- </span>
- #if ($linecount > 0 && $index > 6)
- </span>
- #end
-
- #elseif ($attVal.isSet())
- #if ($display)
- #if ($linecount > 0 && $index > 6)
- #set ($isHidden = !( $currentIssue.isRequiredAttributeFor($att, $user) || $rma.Visible ) )
- <span id="${displayValue}:Container" #if ($isHidden) style="display:none;" #end>
- <span class="displayValue" style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;width:95%;">$displayValue</span>
- #else
- #if ($linecount > 0)
- </td>
- </tr>
- #end
- #set ($linecount = $linecount + 1)
- <tr>
- <th>
- <span style="white-space:nowrap;display:inline;margin-left:0px; margin-right:0px;width:95%;">$displayValue</span>
- #if($fieldExtraHeader)
- <pre>$fieldExtraHeader</pre>
- #end
- </th>
- <td $fieldStyle>
- #set ($newline = false)
- #end
- <span style="display:inline;margin-left:0px; margin-right:10px;width:95%;">
- #if ($att.isOptionAttribute())
- #if (!$attVal.AttributeOption)
- --
- #else
- #if ($module.getRModuleOption($attVal.AttributeOption, $issueType).Active)
- $!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
- #else
- [I]$!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
- #end
- #end
- #elseif ($att.AttributeType.Name == "long-string")
- ## Convert the raw text to formatted HTML before
- ## displaying it.
- $!scarabG.textToHTML($attrInput.Value.toString(), $link, $scarabR.CurrentModule)
- #elseif ($att.isIntegerAttribute())
- #attrValueErrorMsg($attVal "NumericValue")
- #attrValueText($attVal $attrInput.NumericValue $fieldSize $fieldHint)
- #elseif ($att.AttributeType.Name == "date")
- $scarabR.formatDate($!attrInput.Value.value)
- #elseif ($att.AttributeType.Name == "integer")
- $!attrInput.NumericValue.value
- #else
- ## Just output the raw value directly.
- $!attrInput.Value
- #end
- </span>
- #if ($linecount > 0 && $index > 6)
- </span>
- #end
- #end
- #end
-
+ ## tell the macro where we are in the table and then execute it
+ ## looping over all available attributes in the current group
+ #set ($currentRow=0)
+ #set ($currentColumn=0)
+ #foreach ($att in $attributes)
+ #if ($att.equals($myStatusAttribute))
+ ## Discard the status attribute
+ #elseif ($att.equals($myOnHoldExpirationDate))
+ ## Discard the ExpirationDate
#else
- #set ($allAttrValues = $currentIssue.getModuleAttributeValuesMap(false))
- #set ($attVal = $allAttrValues.get($att.getName().toUpperCase()))
- #set ($attrInput = $intake.AttributeValue.mapTo($attVal))
- #set ($isOptionAttr = $attVal.Attribute.isOptionAttribute())
- #if ($attVal.isSet() && (!$attrInput.Value.toString().trim().equals("") || !$attrInput.NumericValue))
- <tr>
- <th>[I] $rma.DisplayValue</th>
- <td>
- #if ($isOptionAttr)
- #if ($module.getRModuleOption($attVal.AttributeOption, $issueType).Active)
- $!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
- #else
- [I]$!module.getRModuleOption($attVal.AttributeOption, $issueType).DisplayValue
- #end
- #elseif ($att.AttributeType.Name == "integer")
- $!attrInput.NumericValue.value
- #else
- $!attrInput.Value
- #end
- </td>
- </tr>
- #end
- #end
+ #displayAttributeInCanvas ($att 1)
+ #end
#end
+ </td></tr>
</table>
#end
#end
Modified: trunk/xdocs/scarab_properties.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/xdocs/scarab_properties.xml?view=diff&pathrev=10819&r1=10818&r2=10819
==============================================================================
--- trunk/xdocs/scarab_properties.xml (original)
+++ trunk/xdocs/scarab_properties.xml 2009-07-22 06:36:38-0700
@@ -1079,6 +1079,9 @@
<customization modification="optional">advanced</customization>
<file/>
<details>
+ A sealed issue is meant to be immutable.
+ That could be because it is closed, or has put into an
+ "unchangeable" state or whatever else is required.
The given issue is recognized as sealed when the status attribute
has been set to the given value. The default behaviour is:
Issue is sealed if (status == closed)
@@ -1086,6 +1089,38 @@
</property>
<property>
+ <name>scarab.common.status.onhold</name>
+ <default>onhold</default>
+ <comment/>
+ <type>Runtime</type>
+ <customization modification="optional">advanced</customization>
+ <file/>
+ <details>
+ An "onhold" issue is typically an issue, which can not be processed
+ right now, but has been postponed to a later time. onHold issues
+ typically also transport a "reactivation date". Note that the here
+ used model is very simplistic: An isue is recognized as onhold when
+ its state value has been set to "onhold", i.e. for the default settings:
+ Issue is onhold if (state=="onhold")
+ </details>
+ </property>
+
+ <property>
+ <name>scarab.common.status.onhold.dateProperty</name>
+ <default>onhold</default>
+ <comment/>
+ <type>Runtime</type>
+ <customization modification="optional">advanced</customization>
+ <file/>
+ <details>
+ This is the attribute which contains the attribute name of
+ the reactivation date for "onhold" issues.
+ </details>
+ </property>
+
+
+
+ <property>
<name>scarab.common.status.sealed.modifyPermission</name>
<default>Domain | Edit</default>
<comment/>
------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2374431