Rev 1226 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
if vars().has_key('expSlide'):print "expSlide=" + `expSlide`# Pick 2G and 3G Feature objectsthreeGFeature = Nonev3Ghours = NoneexpSlide = expSlide.getExpandedChildrenSlides().get(0)print expSlide.getSlideDefinitionID()expSlide = expSlide.getExpandedChildrenSlides().get(0)print expSlide.getSlideDefinitionID()expandedFeatures = expSlide.getExpandedFeatures()for expandedFeature in expandedFeatures:label = expandedFeature.getFeatureDefinition().getLabel()if label == "2G":twoGFeature = expandedFeatureelif label == "3G":threeGFeature = expandedFeaturetwoGBullets = twoGFeature.getExpandedBullets()# Is a single-value fieldtwoGBullet = twoGBullets[0]v2G = twoGBullet.getValue()print "v2G=" + `v2G`v2Gparts = v2G.split()# Take only hoursv2Ghours = float(v2Gparts[0])print "v2Ghours=" + `v2Ghours`if threeGFeature is not None:threeGBullets = threeGFeature.getExpandedBullets()# Is a single-value fieldthreeGBullet = threeGBullets[0]v3G = threeGBullet.getValue()print "v3G=" + `v3G`v3Gparts = v3G.split()# Take only hoursv3Ghours = float(v3Gparts[0])print "v3Ghours=" + `v3Ghours`# Rough values# 2G High > 10, Medium > 5 else Low# 3G High > 5, Medium > 3 else Low# Overall: Highest of both e.g. if 2G:Low and 3G:Medium, Overall:Medium# 1 - Low# 2 - Medium# 3 - High# 2G logicif v2Ghours >= 10:r2G = 3elif v2Ghours >= 5:r2G = 2else:r2G = 1# 3G logicif v3Ghours >= 5:r3G = 3elif v3Ghours >= 3:r3G = 2else:r3G = 1print "r2G=" + `r2G`print "r3G=" + `r3G`# Overall scoreif r2G < r3G:overall = r2Gelse:overall = r3Gif overall == 1:strRate = "Low"elif overall == 2:strRate = "Medium"else:strRate = "High"values = []values.append(strRate)