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

Substitute null for unspecified optional inputs in direct SQL execution #31

Merged
merged 1 commit into from
Jun 21, 2019

Conversation

bgharper
Copy link
Contributor

Optional inputs were not handled in direct SQL execution. This will substitute a literal SQL NULL for any input whose value was not saved by ScriptRunner; input values are NULL if an optional input is not entered in scripts, and the standard way to check for presence of an optional input in a Relativity script is to run ISNULL. Note the frontend forces users to enter values for required inputs, this means only optional inputs would not have a value saved.

@bgharper
Copy link
Contributor Author

#27

// Optional input are not handled explicitly for saved searches --
// Per relativity this is not officially supported, so if an optional search input
// is not supplied the script execution will simply fail.
// https://devhelp.relativity.com/t/documentation-around-non-required-relativity-script-inputs/6535/5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we can hard fail here with a clear error message? Or is that actually worse than failing like Relativity would?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather just let it fall through to the error you'd get with the script since the default behavior is "it's just null, even if it's really an unescaped string substituted for a column name" (not sure how that works, but it does), except in the case of saved searches where it just flat out doesn't work anyway.

@bgharper bgharper merged commit 4c754cc into Milyli:develop Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants