Bug 1263118 - "Repository View" doesn't remember the last visited place
"Repository View" doesn't remember the last visited place
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.1.0
Unspecified Unspecified
urgent Severity high
: ER4
: 6.2.0
Assigned To: manstis
Marián Macik
:
: 1263501 (view as bug list)
Depends On:
Blocks: 1263504
  Show dependency treegraph
 
Reported: 2015-09-15 03:27 EDT by Toshiya Kobayashi
Modified: 2015-12-21 11:15 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1263504 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GUVNOR-2265 Major Resolved "Repository View" doesn't remember the last visited place 2016-06-15 08:00 EDT

  None (edit)
Description Toshiya Kobayashi 2015-09-15 03:27:57 EDT
Description of problem:

Platform BZ for https://issues.jboss.org/browse/GUVNOR-2265


Steps to Reproduce:
1. Go to [Authoring] -> [Project Authoring]
2. Change to "Repository View" in Project Explorer
3. Go to some directory. For example, "project1/src/main/java"
4. Go to [Home] -> [Home Page]
5. Go back to [Authoring] -> [Project Authoring]

Actual results:

"Project View" displays the root directory.

Expected results:

"Project View" displays "project1/src/main/java" where you visited before.
Comment 1 Toshiya Kobayashi 2015-09-15 03:34:01 EDT
"Project View" doesn't have this problem. BRMS 6.0.3 + "Repository View" doesn't as well.

With a debugger, I see that FolderListingResolver simply returns the root directory in case of Option.TECHNICAL_CONTENT ("Repository View").

https://github.com/droolsjbpm/kie-wb-common/blob/master/kie-wb-common-screens/kie-wb-common-project-explorer/kie-wb-common-project-explorer-backend/src/main/java/org/kie/workbench/common/screens/explorer/backend/server/FolderListingResolver.java#L78
Comment 2 Toshiya Kobayashi 2015-09-15 03:41:23 EDT
Correction:

from

=======================
Actual results:

"Project View" displays the root directory.

Expected results:

"Project View" displays "project1/src/main/java" where you visited before.
========================

to 

========================
Actual results:

"Project Explorer" displays the root directory.

Expected results:

"Project Explorer" displays "project1/src/main/java" where you visited before.
========================
Comment 3 William Antônio 2015-09-15 12:57:18 EDT
Additionally, it should also remember the user details when the user close the browser and login back after a while (the preference should be persisted). It used to work on BPM Suite 6.0.x.
Comment 4 Toshiya Kobayashi 2015-09-15 22:21:24 EDT
*** Bug 1263501 has been marked as a duplicate of this bug. ***
Comment 5 Toshiya Kobayashi 2015-09-15 22:24:59 EDT
So please add one more use case for testing.

1. Go to [Authoring] -> [Project Authoring]
2. Change to "Repository View" in Project Explorer
3. Go to some directory. For example, "project1/src/main/java"
4. Logout/Login
5. Go back to [Authoring] -> [Project Authoring]

Actual results:

"Project Explorer" displays "Project View".

Expected results:

"Project Explorer" displays "Repository View" and "project1/src/main/java" where you visited before.
Comment 6 manstis 2015-09-23 11:52:14 EDT
Before diving into enhance Project Explorer I need to explain *how* it works now.. as what you report is not a bug but completely by design. 

We endeavour to synchronize the "Business" and "Technical" views, so if you navigate to folder src/main/resources/org/yourco in the "Technical" view, when you switch to the "Business" view we show the "org/yourco" folder content. Nice and easy for switching between "Technical" and "Business" views.

Things are not so straight forward when switching the other way. The "Business" view shows all items in a package; be in src/main/java, src/main/resources, src/test/java or src/test/resources; so when you switch from "Business" view to "Technical" view there's to way to synchronize the context and we default to the Project root.

So there are two courses of action:-

1) Store the state of the "Business" view separate to the "Technical" view, so when you switch between the two views only the previous state of the view is restored - with no attempt to synchronize from the previous view.

2) Store additional meta-data for the "classifier" (src/java, src/resources, test/java or test/resources) of the package viewed in the "Technical" view and use this to ensure the correct context of the selected package is used when switching from the "Business" view. If the package has changed entirely we have no option but to revert to the Project root.

I feel option 2 is closer to what may be required; but please read this, confirm you understand why it works the way it does - and most importantly agree which option you want implemented.
Comment 7 Toshiya Kobayashi 2015-09-23 23:29:32 EDT
I'm sorry, Mike.

Probably my first Description confused you (it's corrected by comment#2). "Project View" <-> "Repository View" compatibility is not the concern of this BZ. Let's focus on steps in comment#5 because it tells the concern clearly.

======================
1. Go to [Authoring] -> [Project Authoring]
2. Change to "Repository View" in Project Explorer
3. Go to some directory. For example, "project1/src/main/java"
4. Logout/Login
5. Go back to [Authoring] -> [Project Authoring]

Actual results:

"Project Explorer" displays "Project View".

Expected results:

"Project Explorer" displays "Repository View" and "project1/src/main/java" where you visited before.
======================

A) Users want business-central to remember "Which View I was using". So they want to see "Repository View" after logout/login.

B) Users want business-central to remember "Where I was in Repository View" while using Repository View. So they want to see the last visited path in Repository View after logout/login (or going to [Home] and back).

During the operation. the user doesn't use "Project View". These A) and B) are the requirements from the customer. Aren't they simpler than you thought? 

As far as I understand from the comment#6, BRMS 6.1 introduced the new capability:

C) Users can switch from "Repository View" to "Project View" with an appropriate path.

Your "2) Store additional meta-data ... " seems to improve the switch from "Project View" to "Repository View". And probably it helps to resolve B) even if the user doesn't use "Project View"...?

So I think "2) Store additional meta-data ... " is the better option. Anyway, goals are A) and B).

Feel free to let me know if I'm still missing your point.
Comment 10 JBoss JIRA Server 2015-09-29 13:14:19 EDT
Michael Anstis <michael.anstis@gmail.com> updated the status of jira GUVNOR-2265 to Resolved
Comment 11 Marián Macik 2015-10-21 09:05:20 EDT
Verified with 6.2.0.ER4. Repository view is now correctly preserved after login/logout and after going to Home Page and back to Project Authoring.

Note You need to log in before you can comment on or make changes to this bug.