Uploaded image for project: 'mifos'
  1. mifos
  2. MIFOS-5024

Can't search using composite names

    Details

    • Type: Bug
    • Status: Ready to Ship / Verified
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Release 2.1
    • Fix Version/s: Release 2.1.3
    • Component/s: Search
    • Labels:
    • Team:
      Core
    • Scheduled For:
      Release

      Description

      Login to Mifos
      try searching using a composite name ex: (George tony john bailey)

      Result:
      An unhandled error has occurred. Please contact your system administrator.
      Hide stack trace
      java.lang.IndexOutOfBoundsException: Index: 2,Size: 2
      at java.util.SubList.rangeCheck(Unknown Source)
      at java.util.SubList.get(Unknown Source)

      PS:
      I tried to reproduce the bug on
      http://ci.mifos.org:8104/mifos/
      and i couldn't

      But i succeeded reproducing it on
      http://demo.mifos.org/mifos/

        Attachments

          Activity

          georgeslteif George Lteif created issue -
          keithwoodlock keithwoodlock (Inactive) made changes -
          Field Original Value New Value
          Assignee mifosdeveloperqueue [ mifosdeveloperqueue ]
          keithwoodlock keithwoodlock (Inactive) made changes -
          Fix Version/s Unscheduled [ 10193 ]
          Affects Version/s Release 2.1 [ 10311 ]
          Component/s Search [ 10385 ]
          Hide
          kaychau Kay Chau added a comment - - edited

          I can confirm that this bug is only on 2.1.x. On server 8120, if you search for Karen May Abu Last, you get the stack trace. On 8085, if you search for the same name, you get the correct search result returned.

          Show
          kaychau Kay Chau added a comment - - edited I can confirm that this bug is only on 2.1.x. On server 8120, if you search for Karen May Abu Last, you get the stack trace. On 8085, if you search for the same name, you get the correct search result returned.
          Hide
          kaychau Kay Chau added a comment -

          Can you look at asap and see if it's a quick fix in 2.1.x? It's only on that branch, and not on G.

          Show
          kaychau Kay Chau added a comment - Can you look at asap and see if it's a quick fix in 2.1.x? It's only on that branch, and not on G.
          kaychau Kay Chau made changes -
          Assignee mifosdeveloperqueue [ mifosdeveloperqueue ] keithwoodlock [ keithwoodlock ]
          Fix Version/s Release 2.1.3 [ 10430 ]
          Fix Version/s Release G - Iteration 8 [ 10431 ]
          Fix Version/s Unscheduled [ 10193 ]
          keithwoodlock keithwoodlock (Inactive) made changes -
          Status Open [ 1 ] Development In Progress [ 3 ]
          Hide
          keithwoodlock keithwoodlock (Inactive) added a comment -

          only on f-release version on mifos:

          java.lang.IndexOutOfBoundsException: Index: 2,Size: 2
          at java.util.SubList.rangeCheck(AbstractList.java:746)
          at java.util.SubList.get(AbstractList.java:619)
          at org.mifos.customers.persistence.CustomerPersistence.mainSearch(CustomerPersistence.java:434)
          at org.mifos.customers.persistence.CustomerPersistence.search(CustomerPersistence.java:315)
          at org.mifos.customers.struts.action.CustSearchAction.mainSearch(CustSearchAction.java:217)

          works for

          name
          name name
          name name name
          breaks for name name name name

          Show
          keithwoodlock keithwoodlock (Inactive) added a comment - only on f-release version on mifos: java.lang.IndexOutOfBoundsException: Index: 2,Size: 2 at java.util.SubList.rangeCheck(AbstractList.java:746) at java.util.SubList.get(AbstractList.java:619) at org.mifos.customers.persistence.CustomerPersistence.mainSearch(CustomerPersistence.java:434) at org.mifos.customers.persistence.CustomerPersistence.search(CustomerPersistence.java:315) at org.mifos.customers.struts.action.CustSearchAction.mainSearch(CustSearchAction.java:217) works for name name name name name name breaks for name name name name
          Hide
          keithwoodlock keithwoodlock (Inactive) added a comment -

          The comments in the code say it all.

          '...we support up to 3 words for client search..'

          So looks like in f-release only 3 words are support for client search.

          Show
          keithwoodlock keithwoodlock (Inactive) added a comment - The comments in the code say it all. '...we support up to 3 words for client search..' So looks like in f-release only 3 words are support for client search.
          Hide
          kaychau Kay Chau added a comment -

          Is it easy to port what we had in G over to support up to 4? Either that or we should not be showing a stack trace at all - should be an error message that 4 word search is not supported. Supporting 4 is the ideal solution though

          Show
          kaychau Kay Chau added a comment - Is it easy to port what we had in G over to support up to 4? Either that or we should not be showing a stack trace at all - should be an error message that 4 word search is not supported. Supporting 4 is the ideal solution though
          Hide
          mifos-hudson Mifos Hudson Jira Plugin User added a comment -

          Integrated in head-f-release #178
          MIFOS-5024: make change so main search is like head master code in effort to stop search for four names causing out of bounds exception.

          Keith Woodlock : 12e8585ca853bf5d5379d6d0e26d6957f6ef2c7d
          Files :

          • appdomain/src/main/java/org/mifos/customers/persistence/CustomerPersistence.java
          Show
          mifos-hudson Mifos Hudson Jira Plugin User added a comment - Integrated in head-f-release #178 MIFOS-5024 : make change so main search is like head master code in effort to stop search for four names causing out of bounds exception. Keith Woodlock : 12e8585ca853bf5d5379d6d0e26d6957f6ef2c7d Files : appdomain/src/main/java/org/mifos/customers/persistence/CustomerPersistence.java
          Hide
          keithwoodlock keithwoodlock (Inactive) added a comment -

          made this the same as it is in head master. ie. no stack trace will appear for any number names with spaces between them. However, client search only supports 3 search terms (in f-release and head/master)

          Show
          keithwoodlock keithwoodlock (Inactive) added a comment - made this the same as it is in head master. ie. no stack trace will appear for any number names with spaces between them. However, client search only supports 3 search terms (in f-release and head/master)
          keithwoodlock keithwoodlock (Inactive) made changes -
          Status Development In Progress [ 3 ] Ready for Testing / Resolved [ 5 ]
          Assignee keithwoodlock [ keithwoodlock ] mifosqa [ mifosqa ]
          Scheduled For Release
          Fix Version/s Release G - Iteration 8 [ 10431 ]
          Resolution Fixed [ 1 ]
          Hide
          kaychau Kay Chau added a comment -

          i've verified this

          Show
          kaychau Kay Chau added a comment - i've verified this
          kaychau Kay Chau made changes -
          Status Ready for Testing / Resolved [ 5 ] Ready for Showcase [ 10007 ]
          kaychau Kay Chau made changes -
          Status Ready for Showcase [ 10007 ] Ready to Ship / Verified [ 10000 ]

            People

            • Assignee:
              mifosqa mifosqa
              Reporter:
              georgeslteif George Lteif
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: