Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Highlights not updating after removing sumamry field

    SmartClient_SNAPSHOT_v90d_2013-04-05
    All browsers

    This is a minor cosmetic issue that I have encountered while testing and I thought I would pass it along in case its not the desired behavior that the grid should have.

    Repro steps:
    =========
    1. Load the test page below
    2. Create summary column with #Inspections as the value
    3. Open hilite tool
    4. Create highlight on # Inspections, matches other field from step #2, background color red
    5. Note that # Inspections is highlighted red for all rows (correct behavior)
    6. Remove summary field created in step # 2.
    7. Note that the # Inspections field is still highlighted red, even though summary column has been removed (no data to compare against)

    Adding another summary column with the same name or clearing the rule will clear the formatting, so it seems like there is a missing listener on the sumamry field remove event.

    Code:
    <html>
    
    
    <head>
        <title >Chart Test Case</title>
    	
       	<script type="text/javascript" >
    		var isomorphicDir="http://localhost:8080/isomorphic/";
    		
    		var data = [
    			{inspectorID:12345, inspections:206,observations:913,lastInspectionDate:"2012-08-31",index:52.6, inspectionType: {id:123, name:"type1"}},
    			{inspectorID:67890, inspections:66,observations:0,lastInspectionDate:"2013-02-02",index:75.3, inspectionType: {id:123, name:"type1"}},
    			{inspectorID:88776, inspections:66,observations:67,lastInspectionDate:"2013-02-02",index:75.3, inspectionType: {id:123, name:"type1"}},
    			{inspectorID:44556, inspections:206,observations:0,lastInspectionDate:"2012-08-31",index:52.6, inspectionType: {id:123, name:"type1"}}
    		];
    </script>
    	
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Grids.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script> 
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
     <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
    </head>
    <body>
    
     <script type="text/javascript">
     var gridObject = null;
     
    		function applyAggregate(summaryField, fnx) {
    	
    			gridObject.getField("observations").summaryFunction = "sum";
    			gridObject.recalculateSummaries();
    		}				
     
    		gridObject = isc.ListGrid.create({
    				fields:[
            {name:"inspectorID", title:"Inspector ID", type:"integer", summaryFunction:[] },
            {name:"inspections", title:"# Inspections", summaryFunction:[]},
            {name:"observations", title:"# Observations", summaryFunction:[]}
    			],
    				dataFetchMode : "local",
    				data: data,
    				width : "100%",
    				align : "center",
    				autoFitData : "vertical",
    				autoFitMaxHeight : 400,
    				alternateRecordStyles : true,
    				canAddFormulaFields : true,
    				canAddSummaryFields : true,
    				canGroupBy : true,
    				canReorderFields : true,
    				showGroupSummary : true,
    				groupByMaxRecords : 5
    			});
    			
    			
    		</script>	
    
    </body>
    </html>

    #2
    This problem also exists for formula columns and when editing the value of summary and formula columns. This appears to be a bug, but I can provide a workaround if you can point me to what event gets fired when the user creates/updates/removes formula/summary columns. I can then reapply the hilites to the grid so these problems do not crop up.

    Thanks.

    Comment


      #3
      I know that this is a minor issue, but was checking to see if there was any thoughts on the issue?

      Comment


        #4
        It's queued to be looked at, but as you mentioned it's a bit minor so it's behind other stuff.

        Comment


          #5
          Bumping this post as we now have a support contract.

          Comment


            #6
            Adding another (slightly different) test case:
            1. Load the test page below
            2. Create summary column with #Inspections as the value
            3. Open hilite tool
            4. "New Field" -> greater than 100 -> Background -> #FF00FF
            5. Note that New Field is highlighted red for two rows (correct behavior)
            6. Remove new field created in step # 2.
            7. Open hilite tool
            8. Try to remove hilite rule (note that it changes the field name as well) The rule is greyed out and not editable.

            Comment


              #7
              Adding one more test case that deals with formatting oddities.

              1. Add a formula column for 'Observations' column (numeric column)
              2. Apply the format observations > 60
              3. Observer one row has hilite
              4. Remove this column
              5. Add a formula column for inspections
              6. Observe all four rows are highlighted

              I expect that this behavior is somewhat expected. The formula and summary columns are named automatically, formula1, formula2, etc. When removing a column and adding another one, then the rule sees the same field (even though it was based on another field than the previous formula field was).

              Comment


                #8
                Just a quick note to say we're looking at all of these and will follow up when we have more info.

                Comment


                  #9
                  Thanks, sorry to post so many derivations, but I figured that they are all related in some sense so it may be easier to look at them at the same time.

                  Comment


                    #10
                    No problem - we agree that these are closely enough related they make sense to group together.
                    The first issue you reported is now resolved (try the next nightly build, 9.0 branch).

                    We're still looking at the other issues.

                    Regards
                    Isomorphic Software

                    Comment


                      #11
                      On this specific issue: We wouldn't describe this as a bug exactly, though we agree it could be unexpected in some cases.
                      We've decided to make a change which will make this effect less likely, though not impossible to hit.

                      As of tonight's nightly build, we're modifying the naming process for these user-generated fields so that, if an explicit title was provided, we apply a field name based on that title.
                      If the title wasn't edited from the default, (or it is not a string we can readily convert to a valid JS identifier), we will continue to use the existing system of naming things "summary1", etc.
                      So this is likely to reduce the incidence of this particular issue, though it's not intended to be a complete resolution

                      This is going to mainline only (so will effect 9.1d builds and future builds, but not 9.0p).

                      Regards
                      Isomorphic Software

                      Comment


                        #12
                        We've now made a change to address this last issue. This should show up in the next nightly build. Essentially you'll see non-interactive text describing the hilite applied to a missing field, but the remove button will be active, so you can remove it to get rid of it.

                        Regards
                        Isomorphic Software

                        Comment


                          #13
                          Sorry to revive such an old post, but I think I have come up with a solution for all scenarios. I am trying to change the default text that the formula and summary builder dialogs display using
                          Code:
                          FormulaBuilder.defaultNewFieldTitle = "Some title";
                          However, this does not seem to work. Can you tell me how I can set this on the FormulaBuilder object?

                          Comment


                            #14
                            Please disregard, I forgot to use setProperty....

                            Comment

                            Working...
                            X