Author: hair
Date: 2008-05-15 05:48:19-0700
New Revision: 10579
Modified:
trunk/src/conf/conf/TurbineResources.properties
trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java
trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm
trunk/xdocs/scarab_properties.xml
Log:
Issue SCB2506: (More informations about the issues in dependency tab). Thanks to Johannes Hoechstaedter.
Modified: trunk/src/conf/conf/TurbineResources.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/TurbineResources.properties?view=diff&rev=10579&p1=trunk/src/conf/conf/TurbineResources.properties&p2=trunk/src/conf/conf/TurbineResources.properties&r1=10578&r2=10579
==============================================================================
--- trunk/src/conf/conf/TurbineResources.properties (original)
+++ trunk/src/conf/conf/TurbineResources.properties 2008-05-15 05:48:19-0700
@@ -811,3 +811,4 @@
template.TemplateList.vm.noIssueTypesForwardsTo=IssueTypeList.vm
template.admin/XMLExportIssues.vm.noIssueTypesForwardsTo=IssueTypeList.vm
template.admin/XMLImportIssues.vm.noIssueTypesForwardsTo=IssueTypeList.vm
+scarab.common.dependency.tabattributes=[JIRA] Version
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&rev=10579&p1=trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java&p2=trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java&r1=10578&r2=10579
==============================================================================
--- trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java (original)
+++ trunk/src/java/org/tigris/scarab/tools/ScarabGlobalTool.java 2008-05-15 05:48:19-0700
@@ -102,6 +102,11 @@
import org.apache.turbine.Turbine;
+import org.tigris.scarab.om.Attribute;
+
+import java.util.Arrays;
+import java.util.Iterator;
+
/**
* This scope is an object that is made available as a global
* object within the system.
@@ -931,4 +936,52 @@
}
return result;
}
+
+
+ /**
+ * returns a list with all attributes which are set for the dependency tab.
+ * currently implementation from http://www.solitone.org/scarab/issues/id/SCB2506
+ * this is currently hardcoded via the scarab.common.dependency.tabattributes property.
+ * TODO patches to provide more dynamic specifications of attributes columns to show are wanted.
+ * @return
+ */
+ public static List getGlobalDependencyAttributes(){
+
+ try
+ {
+
+ final String value = Turbine.getConfiguration()
+ .getString("scarab.common.dependency.tabattributes");
+
+ if(value.length()>0){
+
+ final String[] a_value = value.split(";");
+ final Attribute[] a_attributes = new Attribute[a_value.length];
+ final List attributes=AttributePeer.getAttributes();
+
+ //map every attribute name from the property file to the specific attribute
+ for(int i=0;i<a_value.length;i++){
+
+ final Iterator iter = attributes.iterator();
+
+ while(iter.hasNext()){
+
+ final Attribute attr = (Attribute)iter.next();
+
+ if(attr.getName().equals(a_value[i])){
+ a_attributes[i]=attr;
+ }
+ }
+ }
+
+ return Arrays.asList(a_attributes);
+ }
+
+ }
+ catch (Exception e)
+ {
+ Log.get().error(e);
+ }
+ return null;
+ }
}
Modified: trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm?view=diff&rev=10579&p1=trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm&p2=trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm&r1=10578&r2=10579
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab4Dep.vm 2008-05-15 05:48:19-0700
@@ -169,6 +169,21 @@
#end
</td>
+
+ #set ($tab_attributes=$scarabG.getGlobalDependencyAttributes())
+ #if($tab_attributes)
+ #foreach ($attr in $tab_attributes)
+ <td width="100%" #addBackground("$blockingStatus" "$status")>
+ #set ($attrvalue=[])
+ #set ($attrvalue=$depend.getAttributeValue($attr.AttributeId))
+ #if($attrvalue.Value)
+ $attrvalue.Value
+ #else
+ $l10n.None
+ #end
+ </td>
+ #end
+ #end
</tr>
## --------------------------------------------------------
@@ -289,6 +304,14 @@
<th nowrap="nowrap" >$l10n.BlockedStatus</th>
<th nowrap="nowrap" >$l10n.IssueId</th>
<th nowrap="nowrap" >$l10n.Summary</th>
+ #set ($tab_attributes=$scarabG.getGlobalDependencyAttributes())
+ #if($tab_attributes)
+ #foreach ($attr in $tab_attributes)
+ <th nowrap="nowrap" >
+ $attr.Name
+ </th>
+ #end
+ #end
</tr>
Modified: trunk/xdocs/scarab_properties.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/xdocs/scarab_properties.xml?view=diff&rev=10579&p1=trunk/xdocs/scarab_properties.xml&p2=trunk/xdocs/scarab_properties.xml&r1=10578&r2=10579
==============================================================================
--- trunk/xdocs/scarab_properties.xml (original)
+++ trunk/xdocs/scarab_properties.xml 2008-05-15 05:48:19-0700
@@ -881,7 +881,20 @@
<type>Runtime</type>
<file/>
</property>
-
+
+<property>
+ <name>scarab.common.dependency.tabattributes</name>
+ <default></default>
+ <comment/>
+ <type>Runtime</type>
+ <file/>
+ <details>
+ Put here all names of the attributes,
+ which you want to see additionally
+ in the dependency tab.
+ </details>
+ </property>
+
<group name="NTLM domain">
<details>
These properties will allow Scarab to try to authenticate users against a
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.