Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project:deploy command uses User's Time Zone to set scheduling components #645

Open
ericgrubaughcompass opened this issue Oct 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ericgrubaughcompass
Copy link

Your environments

OS : Local Ubuntu 20.04 and CircleCI Ubuntu 22.04
Node.js version : 18.8.0 in both
suitecloud-cli version : 1.6.2 in both
Terminal/CMD tool : Ubuntu bash shell in both

Describe the bug

When executing the project:deploy command on an Object with a scheduling component (e.g. a Map/Reduce Script Deployment or a Scheduled Script Deployment), any times within the scheduling component are converted into the time zone set in the User's Preferences within NetSuite. This can unexpectedly and significantly change the schedule of a Script Deployment if the difference between the User's Preference and the Script Deployment forces the schedule to cross a day or month boundary, even if no actual change was made to the Script Deployment's schedule.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Script Deployment which contains a scheduling component, either a Map/Reduce or a Scheduled Script.
  2. Schedule it to run monthly, on the 1st of each month, starting at midnight.
  3. Add the XML for the Script, including the new Script Deployment, to your SDF project.
  4. Run suitecloud project:deploy
  5. In the NetSuite UI, change the time zone in your User Preferences to an earlier time zone (e.g. change US Eastern to US Pacific).
  6. Run suitecloud project:deploy

You can repeat the steps with similar day-, month-, or year-boundary scenarios and receive the same result. Not all of these changes will produce errors; some will deploy successfully, and that is perhaps even more troubling as it may result in scripts running at unexpected and often incorrect times.

Actual Behavior

Deployment fails with an error similar to:

Details: Because the number of days in each month differs, recurring monthly events cannot be scheduled after the 28th.

Expected Behavior

Script Deployment schedules are not modified by the user's time zone preference.

Additional context

A user's time zone preference should have no impact on the configuration of a Script Deployment being deployed from the command line. If any specific time zone preference must be used, it should likely be the Company Preference rather than any individual user.

@ericgrubaughcompass ericgrubaughcompass added the bug Something isn't working label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant