Hello,
Our project has been growing for over 20 years. There are a bunch of appscripts. The scripts have many hard coded comparisons with TS_ID values. The code works well but the problem is that when I port from my test environment to my production environment I have reads that determine which environment I'm in and then use an if statement to reveal the prod version of TS_ID comparisons. Many of the scripts are thousands of lines.
The real power of the Project is its use of relational multi-selection fields. The code builds the content in the fields with arrays related to the TS_ID's and manipulates the arrays from one to the other through push and pop code. So, users see a list of checkboxes that are available in one state. The select the items they have installed and click the transition, then those selected items move to the other list of check boxes. ( While I was in college every programming course had a linked list programming assignment. I hated the exercise and thought I would never use the logic..... Funny how the application we developed uses linked lists throughout. )
At this point in time we are thinking about creating a pre-prod environment. I don't want to create another set of hard coded comparisons. I think the best way to create a pre prod environment would be to remove all the hard coded comparisons and use the field names so the code is portable. I guess I would have to build my arrays but reading the selection items by name and grabbing their id's. This will be a big operation at this point in time because it's been in production for over 20 years.
Did I go down the wrong road with all of the TS_ID comparisons or is that normal?
Is there a way to clone the entire database and rename it and publish out to that for pre-prod?
Also, it's all in appscript. Is appscript going away? Should I convert to modscript if I attempt to rewrite the code?
Thanks in advance for any constructive criticism that you wish to share.
Regards,
Will