Bug 1039916

Summary: Editor for project.imports file incomplete, Restore button saves
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: Alexandre Porcelli <porcelli>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Kralik <pkralik>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, lpetrovi, mbaluch, porcelli, vigoyal
Target Milestone: ER2   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Cause: Consequence: Editor for project.imports file is incomplete. Workaround (if any): Use the Project editor instead. Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:58:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zuzana Krejčová 2013-12-10 10:13:15 UTC
Description of problem:

1. The editor for project.imports file ("External imports") offers just one menu item/button. It is labelled Restore, but when you click on it, you are offered the option to save the file instead. Restore belongs into the Metadata tab - version history, not on the menu bar.

2. The editor should also enable other operations with the file, the same way as editor for pom.xml or kmodule.xml - the editor's menu bar should contain Save, Delete, Rename, Copy.

3. There are no editor tabs as in the other editors - Edit and Metadata tabs should be here as well.

See also bug 1008859 - no content is visible.


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

Comment 1 Toni Rikkola 2013-12-16 14:35:15 UTC
1. Restoring is actually saving the older version as a new one, but the word save might be confusing. This could use another ticket if needed, since it does affect every editor that has restore. If you open the older version from the metadata, it actually opens the file to a new screen so that it can be compared to the current one. This is why the new editor just has the "restore" button and the restore is not in the metadata panel (This behavior can be changed if needed).

The current view, if you open the editor from the admin view, shows a save-button. I think this has been fixes by other ticket.

2. The categories.xml is created when a new project is created and each project only has one in a set location. Because of this Delete, Rename and Copy are not shown for the editor.

3. The tabs are missing. Going to fix this now.

Comment 2 Zuzana Krejčová 2013-12-16 16:10:22 UTC
(In reply to Toni Rikkola from comment #1)
> 1. Restoring is actually saving the older version as a new one, but the word
> save might be confusing. 

That's okay, the problem is that the Restore button is in the editor for the current version of the file, not for some older version. There is no way to actually get an editor for an older version (as per item 3).

> 
> 2. The categories.xml is created when a new project is created and each
> project only has one in a set location. Because of this Delete, Rename and
> Copy are not shown for the editor.

This isn't about the categories.xml file. This is about the project.imports file.

And as far as I know, each project should also have only one pom.xml and one kmodule.xml, just as only one project.imports (since the product doesn't really allow creating maven modules, for project created through GUI). 
So either all editors for these files (project.imports, pom.xml, kmodule.xml) should offer those operations (Save, Delete, Rename, Copy) or none of these editors (for project.imports, pom.xml, kmodule.xml) should have them (and only offer Save).

Comment 4 Toni Rikkola 2013-12-17 12:10:22 UTC
(In reply to Toni Rikkola from comment #3)
> Commits for 3.
> master:
> https://github.com/droolsjbpm/guvnor/commit/fbc80bc44
> https://github.com/droolsjbpm/drools-wb/commit/8e81d1ecc

And like Zuzana mentioned. The problem was not categories.xml it was project.imports. My mistake, just happens that categories.xml had the same issue.

Ignore these commits for this ticket.

Comment 5 Toni Rikkola 2013-12-17 12:31:53 UTC
(In reply to Zuzana Krejčová from comment #2)
> (In reply to Toni Rikkola from comment #1)
> > 1. Restoring is actually saving the older version as a new one, but the word
> > save might be confusing. 
> 
> That's okay, the problem is that the Restore button is in the editor for the
> current version of the file, not for some older version. There is no way to
> actually get an editor for an older version (as per item 3).
>

So the current state is that the project.imports file does not have neither restore or save. It does need Save.
 
> > 
> > 2. The categories.xml is created when a new project is created and each
> > project only has one in a set location. Because of this Delete, Rename and
> > Copy are not shown for the editor.
> 
> This isn't about the categories.xml file. This is about the project.imports
> file.
> 
> And as far as I know, each project should also have only one pom.xml and one
> kmodule.xml, just as only one project.imports (since the product doesn't
> really allow creating maven modules, for project created through GUI). 
> So either all editors for these files (project.imports, pom.xml,
> kmodule.xml) should offer those operations (Save, Delete, Rename, Copy) or
> none of these editors (for project.imports, pom.xml, kmodule.xml) should
> have them (and only offer Save).

This is true. I feel they should be hidden for all of these files. Delete and rename just breaks the project. Copy only makes sense if the user overwrites some other projects pom.xml/project.imports... with the current one. For that level of editing, overwriting can still be done using the command line git if needed.

3. Is not an issue. Metadata tab works for project.imports.

Comment 6 Alexandre Porcelli 2014-02-06 20:43:15 UTC
Issue fixed on master and product branches:

(master) http://github.com/droolsjbpm/kie-wb-common/commit/31b04e75d
(6.0.x) http://github.com/droolsjbpm/kie-wb-common/commit/86e6a41a8

Comment 7 Zuzana Krejčová 2014-02-21 09:29:04 UTC
(In reply to Toni Rikkola from comment #5)
> > And as far as I know, each project should also have only one pom.xml and one
> > kmodule.xml, just as only one project.imports (since the product doesn't
> > really allow creating maven modules, for project created through GUI). 
> > So either all editors for these files (project.imports, pom.xml,
> > kmodule.xml) should offer those operations (Save, Delete, Rename, Copy) or
> > none of these editors (for project.imports, pom.xml, kmodule.xml) should
> > have them (and only offer Save).
> 
> This is true. I feel they should be hidden for all of these files. Delete
> and rename just breaks the project. Copy only makes sense if the user
> overwrites some other projects pom.xml/project.imports... with the current
> one. For that level of editing, overwriting can still be done using the
> command line git if needed.

Could you also align the project.imports editor with the pom.xml and kmodule.xml editors? It still offers Save only while the other two files can be renamed, copied, deleted.

Since the issue reported is that the editor is incomplete, it just doesn't seem right to close this now.

Comment 8 Alexandre Porcelli 2014-02-24 13:17:56 UTC
Aligned with other editors:

(6.0.x) https://github.com/droolsjbpm/kie-wb-common/commit/5517cace0cc
(master) https://github.com/droolsjbpm/kie-wb-common/commit/bcd7a600c4f

Comment 9 Pavel Kralik 2014-03-20 13:54:12 UTC
Verified for brms-6.0.1-ER2 deployable for eap6.

The editor for project.imports file works the same way as editor for pom.xml or kmodule.xml