news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

key script config off folder id instead of name? #405

Open jacqui opened 2 years ago

jacqui commented 2 years ago

The properties scope we're using now is keyed off the org slug as the parent folder name, which is then used as part of the script config ${key}_prefix for the different settings. This means the shared drive setup in use, which has a content folder at the parent level, won't work as content isn't unique! Maybe we could use the folder ID instead of the name.

As part of working on this issue, I should check through the code to make sure none of it is relying on that parent folder being set to the unique org slug. I don't think it is, but I want to verify that.

TylerFisher commented 2 years ago

We maintain a global cache relating folder names to organizations in our database. For example, "Black by God Content" maps to Black by God's API configuration. This causes issues if people use the same outer folder name. It would be better in the long run to use the folder ID instead of the folder name.