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.
"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
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. ========================
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.
*** Bug 1263501 has been marked as a duplicate of this bug. ***
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.
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.
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.
Michael Anstis <michael.anstis> updated the status of jira GUVNOR-2265 to Resolved
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.