Previously visited screen appears too late

Description

After doing some actions for user, the notification appears first, then user is redirected to the previously screen.

Steps to reproduce:
1. On the Add/Edit User view, change the username
2. Click "Update User" button
3. Loading modal appears
4. The notification appears.
5. User is redirected to the previously screen.

Both 4) and 5) points should be launched at the same time.

Acceptance Criteria

  • after doing some action for users, the notification should appear when user is redirected to the previously screen

Environment

None

Activity

Show:
Nick Reid
August 16, 2017, 6:25 PM

Following on to my previous comment — we want to make the notificationService aware of the loading modal service

We don't want to have code that works like this:
Source: https://github.com/OpenLMIS/openlmis-requisition-ui/blob/master/src/requisition-view/requisition-view.controller.js#L157-L161

Rather this should work like the following:

The reason for this type of change is to keep controller code thin and allow for notification behavior to be set generically in a single place. This will make the change DRY and more maintainable.

Paweł Gesek
August 17, 2017, 11:31 AM
Edited

We've reviewed the video, but we do not really understand what is wrong. Is the problem that the notification stays open on the list page after updating? What's wrong with that?

Is this about the slight delay between success and the list loading?

Nick Reid
August 17, 2017, 5:49 PM

To note what we decided in Sprint QA:

Make sure there is no gap in the loading modal between creating/updating a user and then showing the user list screen

Joanna Bebak
August 18, 2017, 1:17 PM

I checked, and now everything works correctly. Now one is re-directed back to the user list immediately after closing the modal enabling one to set the new user's password, as well as after changing the user's username.

Paweł Gesek
August 21, 2017, 9:46 AM

The root cause an error in the UI code:

Loading modal was closed too soon just after user update request finished, not after user list page was loaded.

Done

Assignee

Mateusz Kwiatkowski

Reporter

Lucyna Laska

Labels

None

Story Points

3

Time tracking

0m

Time remaining

13h 30m

Components

Sprint

None

Fix versions

Priority

Major