Add option to overwrite existing app for scramble fields command #522
Closed
mountaindude
started this conversation in
Ideas
Replies: 1 comment
-
Delivered in 4.3.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current situation
The scramble field command works very well when used now and then from the command line.
Ctrl-Q will create a new app for you with the specified fields scrambled and everything else in the source app untouched.
The new app is not published.
Currently unsupported scenario
Another scenario is that you always want to create a scrambled version of some app, updated with the latest data. Maybe for demo purposes.
That could be achieved by calling Ctrl-Q from an external program task that is set to reload when the source app has finished reloading.
The problem is however that a new app will be created every time the external program task is executed.
Over time there will be many scrambled app versions, unless they are somehow removed.
Suggested change
Publish the scrambled app
The scrambled app will be published to a stream specified by the
new-app-publish-stream
option.Replace already published app with the scrambled app
If a previously created scrambled app (any published app, really) is published to a stream it is possible to do a publish-replace using the newly created scrambled app as source.
When the already published app has been updated the newly created scrambled app will be removed.
The effect is that there will always be an up-to-date scrambled app published in some stream.
Unpublished scrambled app
This scenario does not have a nice, clean solution. A new scrambled app will be created by Ctrl-Q. If it is not to replace a published app, it will be added to the user's My Work area.
One thing Ctrl-Q can do is to first delete any existing apps with name specified in
--new-app-name
.A copy of the source app is then done, and desired fields scrambled.
The effect is that there will only be one scrambled, unpublished app - the one with the latest available data in it.
But the app ID will change, but as long as the app is accessed via the hub that is not a problem.
New options and their priorities
The options may seem a bit complex but on the other hand offer a lot of flexibility.
For example, the following scenarios are possible:
--new-app-publish true
--new-app-publish-name "Stream A"
--new-app-delete
--new-app-publish-replace true
--new-app-publish-replace-app-name "Publ app A"
--new-app-delete-existing-unpublished true
--force
--new-app-publish true
--new-app-publish-name "Stream A"
--new-app-publish-replace true
--new-app-publish-replace-app-name "Publ app A"
--new-app-delete-existing-unpublished true
As shown above it is possible to send the scrambled app to several destinations.
New options
--new-app-cmd
: Empty,publish
orreplace
.--new-app-cmd-id
: ID associated with the--new-app-cmd
option. Refers to app ID or stream ID depending on the cmd.--new-app-cmd-name
: Name associated with the cmd option. Refers to app or stream name depending on the cmd.--new-app-cmd-id
and--new-app-cmd-name
must be specified.--new-app-delete
: Once all other activities are done, delete the newly created scrambled app.--force
: Do not ask for acknowledgment before deleting or replacing existing apps.Beta Was this translation helpful? Give feedback.
All reactions