Bug 1299633 - [GSS](6.2.z) Not able to select specific branch from repository
[GSS](6.2.z) Not able to select specific branch from repository
Status: CLOSED NEXTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high
: CR2
: 6.2.1
Assigned To: Toni Rikkola
Zuzana Krejčová
:
Depends On: 1217006
Blocks: 1288021 1288023 1304447 1218511
  Show dependency treegraph
 
Reported: 2016-01-18 14:58 EST by Alessandro Lazarotti
Modified: 2016-07-31 21:09 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1217006
: 1304447 (view as bug list)
Environment:
Last Closed: 2016-02-03 11:27:07 EST
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)

  None (edit)
Description Alessandro Lazarotti 2016-01-18 14:58:01 EST
+++ This bug was initially created as a clone of Bug #1217006 +++

Description of problem:
I have attached repository(.niogit) which has two branches: dev and master.'master' branch has single project(project1) and 'dev' branch has two project(new & project1). But cant select specific branch from Administration. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Import attached repository
2. Goto Authoring-->Administration and select 'master' branch. In the left panel we can see only one project is listed, click on Update button.
3. Now goto "Authoring"-->Project authoring, we can see both project from 'dev' branch. 
4. Again if we go back to Authoring-->Administration then we can see its referring to 'dev' branch only.

Actual results:
Not able to change branch.

Expected results:
should be able to change branch.


Additional info:

--- Additional comment from JBoss Product and Program Management on 2015-04-29 08:00:07 EDT ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Alessandro Lazarotti on 2015-06-01 09:25:15 EDT ---

Assigning to Toni as recommended by Salaboy at:

https://bugzilla.redhat.com/show_bug.cgi?id=1218511#c4
https://bugzilla.redhat.com/show_bug.cgi?id=1218511#c7

--- Additional comment from Alessandro Lazarotti on 2015-06-01 09:26:06 EDT ---

As commented in the other bug: "The button in Administration is a global switch that shouldn't be there anymore. "

--- Additional comment from Toni Rikkola on 2015-11-09 09:11:49 EST ---

Looks like this ticket is a duplicate with this Jira.

https://issues.jboss.org/browse/GUVNOR-2285

PR with the fix: 
https://github.com/droolsjbpm/kie-wb-common/pull/130

--- Additional comment from Toni Rikkola on 2015-11-10 03:52:11 EST ---

https://github.com/droolsjbpm/kie-wb-common/commit/e363e7a19e9a974e45a9059b03e45ac96a8a419e

--- Additional comment from Toni Rikkola on 2015-11-10 03:52:32 EST ---

(In reply to Toni Rikkola from comment #5)
> https://github.com/droolsjbpm/kie-wb-common/commit/
> e363e7a19e9a974e45a9059b03e45ac96a8a419e

This fix is for master.
Comment 2 Toni Rikkola 2016-01-29 05:41:21 EST
6.3.x : https://github.com/droolsjbpm/kie-wb-common/commit/4b5ddb3e9
Comment 3 Zuzana Krejčová 2016-02-02 10:41:03 EST
+ Selecting a branch in Administration (select a branch and click Update) will update the repo content visible in Administration.
- Selecting a branch in Administration doesn't update the branch selector or repo content in Authoring.
+ Selecting a branch in Authoring however does update the branch selector and repo content in Administration.
- Selecting a branch in Authoring unfortunately doesn't update the shown repo content in Authoring. If there is no project on master branch, switching to another branch that does have a project has no effect.

Tested with a simple repo with 3 branches - master (no project), dev (freshly created maven project with the default example class and test), bugfix (same as dev, but project name and artifact changed to 'test').
Comment 4 Toni Rikkola 2016-02-02 11:47:17 EST
(In reply to Zuzana Krejčová from comment #3)
> + Selecting a branch in Administration (select a branch and click Update)
> will update the repo content visible in Administration.
> - Selecting a branch in Administration doesn't update the branch selector or
> repo content in Authoring.

I think this should only change if the user has never ever opened the Authoring mode. Or any other mode that sets the project context to some branch. This selector sets the the default branch for all the users, but if the user has viewed any branch, usually master, then he needs to change it in the Project Editor. This is the only place where the user can set his own current branch.

> + Selecting a branch in Authoring however does update the branch selector
> and repo content in Administration.
> - Selecting a branch in Authoring unfortunately doesn't update the shown
> repo content in Authoring. If there is no project on master branch,
> switching to another branch that does have a project has no effect.

So based on the report there are 1-2 bugs:

1. The branch selector in Authoring should have no effect on the selector in Administration. 

2. The repo content shown in Authoring should respect the branch selector in Project Explorer, since this changes the current active branch for the entire workbench. If not, then it should have a branch selector of it's own. This makes this either a bug or/and a missing feature.
Comment 5 Toni Rikkola 2016-02-03 04:28:45 EST
Ok, so after double checking the branch selectors in both locations are just for changing the workbench active branch for the current user. Making it so.
Comment 6 Zuzana Krejčová 2016-02-03 06:44:29 EST
(In reply to Toni Rikkola from comment #5)
> Ok, so after double checking the branch selectors in both locations are just
> for changing the workbench active branch for the current user. Making it so.

So, if I understand correctly, making a change in one location should always also update the other location, right? And only for that one user, correct?
Comment 7 Toni Rikkola 2016-02-03 07:46:07 EST
With some limitations.

We only remember the last set branch. Meaning if you have two repositories, you set A to branch RELEASE and B to branch DEV. When you go back to Authoring it shows B repository in DEV branch and when you go back into Administration it B is in DEV, but A is in master ( or what ever branch is first in the list ).
Comment 8 Zuzana Krejčová 2016-02-03 08:05:02 EST
Ok, thanks.

That actually sounds like a bug or missing/unfinished feature - not in the scope of this bug though, so... good to know.
Comment 10 Amritpal Jhajj 2016-02-03 12:19:03 EST
(In reply to Toni Rikkola from comment #7)
> With some limitations.
> 
> We only remember the last set branch. Meaning if you have two repositories,
> you set A to branch RELEASE and B to branch DEV. When you go back to
> Authoring it shows B repository in DEV branch and when you go back into
> Administration it B is in DEV, but A is in master ( or what ever branch is
> first in the list ).

I want to confirm my understanding here.  Is it correct to say that this limitation/behavior is consistent on a per user basis but not across users?  ie. user1's branch selection does not impact user2's active branch.
Comment 11 Toni Rikkola 2016-02-04 01:42:35 EST
Currently the branch selector in Administration changes the branch for all the users. This can cause the screen that lists the repositories in the Administration perspective to be out of sync with the rest of the workbench.

I'm fixing this for the master.

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