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

[SPD-23899] (feat): make compute column liquid tag #725

Conversation

seth-shubham
Copy link

Added a new tag compute Column , that takes input dynamic table name and column to compute and runs the computation on the table and assigns column the computed value.

codebreach and others added 30 commits February 7, 2018 02:08
* added validator for expressions and also added tests for it

* added tests and fixed bugs

* fix
* added moment library

* allow date and term calculation in liquid

* refactor addDuration and subtractDates

* return values directly

* Fix duration in days calculation

* add tests

* Maintain consistency in naming decorators

* use existing decorators to calculate date term calculation

* spell check

* remove functions that are not needed

* WIP: tests updated

* Co-authored-by: Madhav Bhagat <madhav89@gmail.com> tests for add duration and subrtract date

* return duration instead of no of days

* add default argument for getObjectValues function

* handle from_date greater than to_date case

* update tests for negative value of durationInDays

* support for adding durartion and tests for the same

* added tests for assign

* throw error if either value or type is incorrcect in duration calculation.

Co-authored-by: Sumanth Subbarao <sumanth@Sumanths-MacBook-Pro.local>
shubham93 and others added 29 commits April 3, 2020 16:45
…tests from vscode (#12)

Co-authored-by: Shubham <shubham@spotdraft.com>
Co-authored-by: Sumanth Subbarao <sumanth@Sumanths-MacBook-Pro.local>
* return 0 days if duration in days is less than 0

* add tests from null duration

Co-authored-by: Sumanth Subbarao <sumanth@Sumanths-MacBook-Pro.local>
* set time to start of day before calculation of days

* added return for case not supported

Co-authored-by: Shubham <shubham@spotdraft.com>
…tation (#16)

Co-authored-by: Shubham <shubham@spotdraft.com>
* refactored code for null values and added tests

* added isNan in valid number check

Co-authored-by: Shubham <shubham@spotdraft.com>
Co-authored-by: Shubham <shubham@spotdraft.com>
Co-authored-by: Shubham Uniyal <shubham@Shubhams-MacBook-Pro.local>
Co-authored-by: Shubham Uniyal <shubham@Shubhams-MacBook-Pro.local>
* fixed redundant tests

* Added tests and made changes in logic for null computation

Co-authored-by: Shubham <shubham@spotdraft.com>
* added separate tag for returning variable value from appending vars

* added tests

Co-authored-by: Shubham <shubham@spotdraft.com>
Co-authored-by: Shubham <shubham@spotdraft.com>
* Add test and method to get dependecy tree for a single assign tag

* Change the return type of parseAssign

* Handle if else conditions

* add test for complex template

* Add function to transverse the graph to get affected variables

* Add comments

* Obfuscate test vars
…check

Added function and tests for cyclic dependency check
…27)

Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
* added null operation handling for different operations

* Added tests for liquid and updated code

* Added comments

* updated comments

Co-authored-by: Shubham <shubham@spotdraft.com>
* add new tag- parseAssign

* remove .only from describe in parseAssign test

Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
…31)

* support comparision of commonform data types directly using operators

* remove country_code check for phone number

Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
Co-authored-by: Sanket Mishra <sanket@spotdraft.com>
feat: add new dependency method to get all vars that are assigned a value
… summing the values of a specified key in each object. (#36)

* add sum filter

* use performOperations in sumArray to get the sum

* resolved comments

* nit

* nit
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.

9 participants