[discrete] [[breaking_80_scripting_changes]] ==== Scripting changes //NOTE: The notable-breaking-changes tagged regions are re-used in the //Installation and Upgrade Guide //tag::notable-breaking-changes[] .The `JodaCompatibleDateTime` class has been removed. [%collapsible] ==== *Details* + As a transition from Joda datetime to Java datetime, scripting used an intermediate class called `JodaCompatibleDateTime`. This class has been removed and is replaced by `ZonedDateTime`. Any use of casting to a `JodaCompatibleDateTime` in a script will result in a compilation error, and may not allow the upgraded node to start. *Impact* + Before upgrading, replace `getDayOfWeek` with `getDayOfWeekEnum().value` in any scripts. Any use of `getDayOfWeek` expecting a return value of `int` will result in a compilation error or runtime error and may not allow the upgraded node to start. ==== .Stored scripts no longer support empty scripts or search templates. [%collapsible] ==== *Details* + The {ref}/create-stored-script-api.html[create or update stored script API]'s `source` parameter cannot be empty. *Impact* + Before upgrading, use the {ref}/delete-stored-script-api.html[delete stored script API] to delete any empty stored scripts or search templates. In 8.0, {es} will drop any empty stored scripts or empty search templates from the cluster state. Requests to create a stored script or search template with an empty `source` will return an error. ==== .The create or update stored script API's `code` parameter has been removed. [%collapsible] ==== *Details* + The {ref}/create-stored-script-api.html[create or update stored script API]'s `code` parameter has been removed. Use the `source` parameter instead. *Impact* + Discontinue use of the `code` parameter. Requests that include the parameter will return an error. ==== // end::notable-breaking-changes[]