[FEATURE-13238] Client Events cannot be restored once overridden by parent project

8.0.0 (b2019040718)

I created a simple script in my global project and then overrode it in my parent project that inherits the global project, but now I can’t remove the override. I’ve tried deleting it like you do with the inherited scripts to remove the override but no dice (tbh I find using delete to remove the override on an inherited script a bit counter-intuitive and a little scary)

IMO, the overrides for client scripts should work as tag property overrides do, that is with the ability to override individual client script types, not one override for all.

This is something we’d like to do in the future, but would involve a fairly significant (and potentially fragile) amount of work - resources that show up in the tree as a single node (client event scripts, session event scripts, gateway event scripts, etc) are actually a single resource on disk that we treat as a singleton. So, any change to one timer script is actually a change to the entire resource. Better UI around that is something we’d like to explore, but it was a secondary priority to getting the whole system working properly.

Along those lines, that’s probably also the explanation for what you’re seeing. You don’t really override a single client event script - as soon as you make changes, you’ve overridden the entire resource - so you have to delete the entire resource to restore things to the parent’s configuration.

1 Like

As a workaround, consider having your individual gateway event scripts delegate to functions in their own script modules. Then override those script modules as needed.

2 Likes

Thanks for the explanation Paul.

So at the moment to resolve this, would I simply need to delete the resource from the file system for the parent project?

Late, but, yes - for now, you have to outright delete the overriding resource to get back to the “initial” state.
Although I did file a ticket to add UI to allow deleting individual “singleton” resources (ie, gateway, client, session events).

1 Like