Access Greenhopper Taskboard's column limits

I need to access Greenhopper Taskboard's column limits of particular columns for a plugin I am developing.

I looked into the database and I have found where Greenhopper stores the limits, the column-steps mapping, project-column mappings but I cannot find how the column limits are associated with the column names.

Can any one please tell me how to get this data??



1 answer

1 accepted

I solved my problem in the following way, if there is a better way please let me know.

private static String columnValuesTableName = "OSPropertyDecimal";
   private static String columnNamesTableName = "OSPropertyEntry";
   private static String columnMappingTableName = "OSPropertyText";
   private static String COLUMN_MAX= "CAPACITY";
   private static String id ="id";
   private static String entityId = "entityId";
   private static String propertyKey = "propertyKey";
   private static String entityName = "entityName";
   private static String value = "value";
   private static String greenHopper = "GreenHopper";
   private static String configuration = "CONFIGURATION";
   private static String prioritisedColumnName="TaskBoard_type_0";
   private static String scopedColumnName="TaskBoard_type_1";
   //table names
   public static String PRIORITISED = "Prioritised";
   public static String SCOPED = "Scoped";
   private static int getConstraintFromDB(long projectId, String tableColumnName, String constraintType){
      Long tableId = null;
      Double limitdb = null;
      //getting the project <-> column mappings
      List<GenericValue> columnNameList = delegator.findByAnd(columnNamesTableName,,projectId));
      //from all the mappings we need to get the required
      //checking column <->  column constraints' id mappings
      for(GenericValue columnName: columnNameList){
         if(columnName.containsKey(propertyKey) && columnName.containsKey(entityName)){

            //checking for the correct constraint as there is a max and min for each column
            if(columnName.get(propertyKey).toString().compareTo(tableColumnName)==0 &&

               //reading the constraints' table id
               tableId = Double.valueOf(columnName.get(id).toString()).longValue();

               //safety check
                  //making a db query for column limit
                  List<GenericValue> dataList = delegator.findByAnd(columnValuesTableName,,tableId));
                     limitdb = dataList.get(0).getDouble(value);

               //we got what we needed so no need to check

      //safety check
      if(tableId == null || limitdb==null){
         return defaultLimit;

      return limitdb.intValue();

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published Friday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

50 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot