frappe / insights

Open Source Business Intelligence Tool
https://frappe.io/insights
GNU Affero General Public License v3.0
450 stars 219 forks source link

feat: save custom column in tables #120

Closed nextchamp-saqib closed 7 months ago

nextchamp-saqib commented 1 year ago

This pull request introduces a new feature that allows users to create and save custom columns for future use. Currently, users can create calculated columns within the query builder and save the query. However, if they wish to reuse a calculated column in another query, they have to recreate it.

This feature allows users to create a calculated column and save it directly in the corresponding table. For example, a user can create a calculated column called Total Amount in the Sales Invoice table, which sums the values of base_net_total and base_total_taxes_and_charges. This calculated column can then be added to any query involving the Sales Invoice table.

CleanShot 2023-05-04 at 12 39 36@2x CleanShot 2023-05-04 at 12 40 30@2x
codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 91.01% and project coverage change: +0.19 :tada:

Comparison is base (0c958d6) 56.70% compared to head (6e3c750) 56.90%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #120 +/- ## =========================================== + Coverage 56.70% 56.90% +0.19% =========================================== Files 51 51 Lines 2869 2889 +20 =========================================== + Hits 1627 1644 +17 - Misses 1242 1245 +3 ``` | [Impacted Files](https://app.codecov.io/gh/frappe/insights/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=frappe) | Coverage Δ | | |---|---|---| | [insights/insights/query\_builders/sql\_builder.py](https://app.codecov.io/gh/frappe/insights/pull/120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=frappe#diff-aW5zaWdodHMvaW5zaWdodHMvcXVlcnlfYnVpbGRlcnMvc3FsX2J1aWxkZXIucHk=) | `80.59% <91.01%> (+0.23%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.