Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-16795

forms with more than 9 items in a list fail on submit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: Metaobj
    • Labels:
      None

      Description

      We have a rubric in OSP that uses a form with an unlimited number of occurences of an item. In practice there's one occurence per criterion in the rubric. IT's not uncommon to have more than 10. Items beyond the first 9 are ignored.

      The problem is in metaobj-util/tool-lib/src/java/org/sakaiproject/metaobj/utils/mvc/impl/ListWrapper.java. It is presented with an object and an index. If there are more than index items in the list, it gets list[index]. Otherwise it add the item to the end of the list. This works only if the elements in the index are presented in order. Unfortunately the code seems to present them in alpha order, i.e. 1, 10, 11, 12, 13, 2, 3, 4. The problem is that when it gets to 2 it has more than 2 items in the list, so it puts 2 into list[2]. I.e. it overwrites 11.

      I have a patch. It works in simple tests. I hope it doesn't have any bad sideffects, but the current code is clearly wrong.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                osp-jira OSP Jira Team (Inactive)
                Reporter:
                hedrick Charles Hedrick
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code