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

0 votes
Answer 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 Sign up to answer
Community showcase
Published Feb 26, 2019 in Jira Software

How to prevent the propagation of unused project schemes, workflows & screens in Jira software

Atlassian ranks project attributes as the third most important factor impacting performance in the category of data. It’s not surprising, since project attributes are precisely the rules used to ma...

630 views 0 7
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