Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-5879

Radiobuttons for Rule and Action subtypes should have a default selected.

    Details

    • Type: Bug Fix Bug Fix
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-5881Radiobuttons for Rule and Action subtypes labels and buttons touch.
      KULRICE-5878Radiobuttons for Rule and Action subtypes should sort via seq_nbr
      KULRICE-5880Radiobuttons for Rule and Action subtypes should appear under types while not using space when not displayed.
      KULRICE-5717Default Values on KRMS Rule Edit select boxes. Terms and opcodes
      KULRICE-525business rule drop downs should have a blank/null option and default to that
      KULRICE-12593Set default actions for view types
      KULRICE-5915Agenda Edit Rule button should be disabled if no rule has been selected.
      KULRICE-2644Implement a "front page" for routing rule creation that allows the user to select the document type and rule template prior to creating the rule
      KULRICE-9452Sections that have validation messages should be expanded by default.
      KULRICE-1949Workflow needs a concept of a 'default' or 'fail safe' rule to fire when no other rules fire when routing non-client document types
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      Create new Agenda, Add new rule of type Validation Rule, notice no default. Action type of Validation action, notice no default.

      Setting of setDefaultValues with a value doesn't seem to work the way I first suspected. (RadioButtonTypeServiceUtil). This is not fixed by KULRICE-5794 which fixes an issue with a default set in xml. This is for a default set in code using RemotableAttributeField.

        Issue Links

          Activity

          Hide
          Erik Meade added a comment -

          I've tried passing in the key and then the value into the setDefaultValues with no success. Also none of the radio button examples on the Kitchen Sink have defaults.

          Show
          Erik Meade added a comment - I've tried passing in the key and then the value into the setDefaultValues with no success. Also none of the radio button examples on the Kitchen Sink have defaults.
          Hide
          Erik Meade added a comment -

          Related to KULRICE-5794

          Show
          Erik Meade added a comment - Related to KULRICE-5794
          Hide
          Jessica Coltrin (Inactive) added a comment -

          moving all non-critical or blocker jiras from 2.0.0-b2 to 2.0.0-b3 due to the short time frame for b2 & KD taking up one of the two weeks.

          Show
          Jessica Coltrin (Inactive) added a comment - moving all non-critical or blocker jiras from 2.0.0-b2 to 2.0.0-b3 due to the short time frame for b2 & KD taking up one of the two weeks.
          Hide
          Erik Meade added a comment -

          Looks like 5794 does not fix this. I've tried setting the default values to the value, the label, and an index number for the Validation Rule and Action radio buttons (in RadioButtonTypeServiceUtil.java)

          Show
          Erik Meade added a comment - Looks like 5794 does not fix this. I've tried setting the default values to the value, the label, and an index number for the Validation Rule and Action radio buttons (in RadioButtonTypeServiceUtil.java)
          Hide
          Peter Giles (Inactive) added a comment -

          I'm moving this to the KRAD module. Erik, can you provide more detail on how you are setting the default value?

          Show
          Peter Giles (Inactive) added a comment - I'm moving this to the KRAD module. Erik, can you provide more detail on how you are setting the default value?
          Hide
          Erik Meade added a comment -

          org.kuali.rice.krms.impl.validation.RadioButtonTypeServiceUtil

              RemotableAttributeField translateTypeAttribute(KrmsAttributeDefinition krmsAttributeDefinition, Map<String, String> valueLabels) {
          
                  RemotableAttributeField.Builder builder = RemotableAttributeField.Builder.create(krmsAttributeDefinition.getName());
          
                  RemotableRadioButtonGroup.Builder controlBuilder = RemotableRadioButtonGroup.Builder.create(valueLabels);
          
                  builder.setLongLabel(krmsAttributeDefinition.getLabel());
                  builder.setName(krmsAttributeDefinition.getName());
                  builder.setRequired(true);
                  List<String> defaultValue = new ArrayList<String>();
                  defaultValue.add((String) valueLabels.keySet().toArray()[0]); // First value
          //        defaultValue.add(valueLabels.get(valueLabels.keySet().toArray()[0])); // First label
          //        defaultValue.add("1"); // index
                  builder.setDefaultValues(defaultValue);
                  builder.setControl(controlBuilder);
          
                  return builder.build();
              }
          

          Called from ValidationActionTypeServiceImpl and ValidationRuleTypeServiceImpl getAttributeFields methods.

          Show
          Erik Meade added a comment - org.kuali.rice.krms.impl.validation.RadioButtonTypeServiceUtil RemotableAttributeField translateTypeAttribute(KrmsAttributeDefinition krmsAttributeDefinition, Map< String , String > valueLabels) { RemotableAttributeField.Builder builder = RemotableAttributeField.Builder.create(krmsAttributeDefinition.getName()); RemotableRadioButtonGroup.Builder controlBuilder = RemotableRadioButtonGroup.Builder.create(valueLabels); builder.setLongLabel(krmsAttributeDefinition.getLabel()); builder.setName(krmsAttributeDefinition.getName()); builder.setRequired( true ); List< String > defaultValue = new ArrayList< String >(); defaultValue.add(( String ) valueLabels.keySet().toArray()[0]); // First value // defaultValue.add(valueLabels.get(valueLabels.keySet().toArray()[0])); // First label // defaultValue.add( "1" ); // index builder.setDefaultValues(defaultValue); builder.setControl(controlBuilder); return builder.build(); } Called from ValidationActionTypeServiceImpl and ValidationRuleTypeServiceImpl getAttributeFields methods.
          Hide
          Adam Campbell (Inactive) added a comment -

          [9/24/13 2:00:26 PM] EGHM: Think this might be different than the default values which claim to fix it, as this was to be set on the server side, not in the xml file
          [9/24/13 2:01:08 PM] EGHM: For KRMS ( the rules engine). The code changes described in the comment need to be applied to see if it is actually fixed.
          [9/24/13 2:01:24 PM] Adam Campbell: ah ok, so not easily checked
          [9/24/13 2:01:31 PM] EGHM: nope

          Show
          Adam Campbell (Inactive) added a comment - [9/24/13 2:00:26 PM] EGHM: Think this might be different than the default values which claim to fix it, as this was to be set on the server side, not in the xml file [9/24/13 2:01:08 PM] EGHM: For KRMS ( the rules engine). The code changes described in the comment need to be applied to see if it is actually fixed. [9/24/13 2:01:24 PM] Adam Campbell: ah ok, so not easily checked [9/24/13 2:01:31 PM] EGHM: nope
          Hide
          Adam Campbell (Inactive) added a comment -

          [9/24/13 2:11:00 PM] EGHM: actually I think it's still broken, the code defaultValue.add((String) valueLabels.keySet().toArray()[0]); // First value is in there (the other two commented out lines are other ways to try the same thing, and none of the radio buttons for Agena Add Rule Validation Rule and Validation Action are checked by default

          Show
          Adam Campbell (Inactive) added a comment - [9/24/13 2:11:00 PM] EGHM: actually I think it's still broken, the code defaultValue.add((String) valueLabels.keySet().toArray() [0] ); // First value is in there (the other two commented out lines are other ways to try the same thing, and none of the radio buttons for Agena Add Rule Validation Rule and Validation Action are checked by default
          Hide
          Erik Meade added a comment -

          Verified that this is still an issue in 2.4.

          Show
          Erik Meade added a comment - Verified that this is still an issue in 2.4.

            People

            • Assignee:
              Unassigned
              Reporter:
              Erik Meade
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Structure Helper Panel