Hide Forgot
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
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.
(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).
Commits for 3. master: https://github.com/droolsjbpm/guvnor/commit/fbc80bc44 https://github.com/droolsjbpm/drools-wb/commit/8e81d1ecc
(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.
(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.
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
(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.
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
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