PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

List of entities to export not flushed when changing project #14

Closed TG-JC closed 1 year ago

TG-JC commented 3 years ago

Step to reproduce:

What's wrong:

Expectation: when you select another project, right-hand-side list should be flushed.

Workaround: Close and reopen Export dialog box when you want to select another project.

cbadici commented 3 years ago

Hi,

I have verified the issue and I can reproduce it. Typically, I expect that the user would export only entities from a single project in the same repository. However, I can provide you with a solution:

  1. The entities that are exported are persisted as a Mashup parameter, so if you choose another project immediately after you exported other entities, the previously exported entities will appear.
  2. To resolve this, you can edit the GitBackup.EntityPicker.Mashup, edit the Event Router "Entities To Export", add the datashape "SpotlightSearch"
  3. The previous step will clear all the bindings. In this situation, redo the bindings for the Event Router: Bind the output of the service "AddEntitiesToExportList" to input1, "RemoveEntitiesFromExportList" to Input 2, and then bind the Output of the Event Router to the Grid on the right and to the Mashup parameter EntitiesToExport
  4. Configure the Grid columns to display just the Name, Type, LastModifiedDate

I have included my modified Mashup as a reference and I have tested this with ThingWorx 9.1 For the moment, I will not modify the whole extension just for this, but I will keep this in mind for a future release.

Mashups_GitBackup.EntityPicker.Mashup.zip

TG-JC commented 3 years ago

Well, I thing I will get into troubles if I proceed with the fix you propose. When I try to save the Mashup, Thingworx displays a popup saying: "Modifying an extension mashup will prevent it from being upgraded in future versions. Are you sure you wish to continue?"

How can I ensure that Thingworx will override these modifications once I import your next release?

cbadici commented 3 years ago

For the moment, I am not planning a new release. I will provide a new release when I gather more bugs and introduce some enhancements. Because this extension is editable, when I will release a new version, it will not override your modified entities within the extension. In this situation, you will need first to uninstall the extension and then install the new version.

vrosu commented 1 year ago

As a context, adding the fact that the GitBackup extension mashups are editable on purpose, so that users can customize them as they see fit. And also, by design, when a new version of the GitBackup would be released, if you performed customizations, you then need to remove the old GitBackup version, and then install the new one. ThingWorx's Extension upgrade process makes sure to give you a chance to save your modifications (export them to a file) instead of overriding them automatically. This is essentially a trade-off between upgradability and flexibility - I give the chance to the users to insert any customizations they want until a new version is released. Since the Users who use this Extension will be developers, the tradeoff makes sense.