Opened 9 years ago

Closed 9 years ago

#1949 closed defect (fixed)

NullPointerException when merging item lists

Reported by: Nicklas Nordborg Owned by: everyone
Priority: trivial Milestone: BASE 3.6
Component: web Version:
Keywords: Cc:

Description

  1. Start with two item lists of the same type containing a few items each.
  1. On the "Item lists" list page, define a preset by saving the current settings using "view/presets -> Save as".
  1. Enter the view page for one of the lists, and click on one of the "Union", "Intersection" or "Complement" buttons.
  1. Use the "Add item list" button to open a popup for selecting item lists. Before selecting the other list use the "view/preset" to select the preset that was saved earlier.
  1. Click on "Ok". The following error message is displayed:
java.lang.NullPointerException
...at DbControl.reattachItem(DbControl.java:1139)
...at org.apache.jsp.views.itemlists.index_jsp._jspService(index_jsp.java:584)
...

The workaround is to NOT use the "view/preset" to select a saved preset when selecting lists to merge in step 4.

Change History (2)

comment:1 by Nicklas Nordborg, 9 years ago

Milestone: BASE 3.6
Priority: majortrivial

comment:2 by Nicklas Nordborg, 9 years ago

Resolution: fixed
Status: newclosed

(In [6930]) Fixes #1949: NullPointerException when merging item lists

The problem was that the current context is used to store some temporary information while editing items (eg. the current item list). When selecting a saved preset, it replaces the current context and also all temporary objects stored in it, thereby causing the NullPointerException when trying to use it later. All list pages are potentially affected by the same problem.

The fix is to copy temporary objects from the current context to the preset when it is loaded.

Note: See TracTickets for help on using tickets.