Scarab commit: svn commit: r11364 - branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java

[email protected] Tue, 11 Apr 2017 11:38:41 -0700 (PDT)
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2017-04-11 11:38:41-0700
New Revision: 11364

Modified:
   branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java

Log:
add missing api extension for autoclose feature

Modified: branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java
Url: http://scarab.tigris.org/source/browse/scarab/branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java?view=diff&pathrev=11364&r1=11363&r2=11364
==============================================================================
--- branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java	(original)
+++ branches/scarab_11079_legacy_with_ant_maven1/src/java/org/tigris/scarab/workflow/IssueState.java	2017-04-11 11:38:41-0700
@@ -228,6 +228,7 @@
         return result;
     }
     
+        
     /**
      * Check if this issue is active (not on hold and not sealed).
      * @param issue
@@ -238,7 +239,19 @@
     {
         return !(isOnHold() || isSealed());
     }
-    
+
+    /**
+     * Returns the name of 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 static String getStatusAttributeName() throws TorqueException
+    {
+        return Environment.getConfigurationProperty("scarab.common.status.id", null);
+    }
+
     /**
      * Returns the attribute instance, which contains the issues status.
      * Note:  Currently Scarab expects that the Attribute is a drop down list
@@ -249,14 +262,14 @@
     public Attribute getStatusAttribute() throws TorqueException
     {
         Attribute attribute = null;
-        String attributeName = Environment.getConfigurationProperty("scarab.common.status.id", null);
+        String attributeName = getStatusAttributeName();
         if(attributeName != null)
         {
             attribute = issue.getAttribute(attributeName);
         }
         return attribute;
     }
-    
+
     /**
      * Returns the attribute instance, which contains the issues onHoldExpirationDate.
      * Note:  Currently Scarab expects that the Attribute is a DateAttribute

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=3228469