USEPA / emf

Emissions Modeling Framework (EMF)
6 stars 3 forks source link

Issue editing multiple users in User Manager when sorted #141

Closed aeythepa closed 2 months ago

aeythepa commented 10 months ago

As an Administrator, I went to the user manager, sorted on Is Admin and then selected several users and clicked Edit. One time it did open the windows and the next time it didn't. It's a little confusing - I had sorted on last logged in and it worked the first time. Then I applied the other sort and it didn't work.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source) at java.util.ComparableTimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at gov.epa.emissions.framework.client.admin.SelectDTypePanel.sort(SelectDTypePanel.java:176) at gov.epa.emissions.framework.client.admin.SelectDTypePanel.createExcludePanel(SelectDTypePanel.java:63) at gov.epa.emissions.framework.client.admin.SelectDTypePanel.createLayout(SelectDTypePanel.java:55) at gov.epa.emissions.framework.client.admin.SelectDTypePanel.(SelectDTypePanel.java:43) at gov.epa.emissions.framework.client.admin.UpdateUserWindow.selectDTPanel(UpdateUserWindow.java:81) at gov.epa.emissions.framework.client.admin.UpdateUserWindow.display(UpdateUserWindow.java:63) at gov.epa.emissions.framework.client.admin.UpdateUserPresenterImpl.display(UpdateUserPresenterImpl.java:38) at gov.epa.emissions.framework.client.admin.UsersManagerPresenter.showUpdateUser(UsersManagerPresenter.java:84) at gov.epa.emissions.framework.client.admin.UsersManagerPresenter.updateUser(UsersManagerPresenter.java:79) at gov.epa.emissions.framework.client.admin.UsersManagerPresenter.doUpdateUser(UsersManagerPresenter.java:74) at gov.epa.emissions.framework.client.admin.UsersManagerPresenter.doUpdateUsers(UsersManagerPresenter.java:96) at gov.epa.emissions.framework.client.admin.UsersManager.updateUsers(UsersManager.java:243) at gov.epa.emissions.framework.client.admin.UsersManager.access$400(UsersManager.java:39) at gov.epa.emissions.framework.client.admin.UsersManager$4.actionPerformed(UsersManager.java:174) at gov.epa.emissions.commons.gui.SelectAwareButton$1.actionPerformed(SelectAwareButton.java:34)

aeythepa commented 10 months ago

It seemed like once it got into this state, I couldn't edit any other users.

cseppan commented 2 months ago

The issue turned out to be displaying a user's list of Hidden Dataset Types. For one user, there were non-sequential indexes in the user_excluded_dataset_types database table, which causes the NullPointerException shown above. I manually fixed the index problem and was then able to open up the user's profile.