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

feat(formula): today function, set numfmt data #1295

Merged
merged 24 commits into from
Feb 20, 2024
Merged

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented Jan 29, 2024

  • I am sure that the code is update-to-date with the dev branch.

close #

  • TODAY function
  • DATE function
  • EDATE function (supports array, refer to Google Sheets)
  • YEAR
  • MONTH
  • DAY
  • MATCH
  • XMATCH
  • formula sets numfmt when link to numfmt cell
  • fix CONCATENATE calculate error

Copy link

github-actions bot commented Jan 31, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 165 lines in your changes are missing coverage. Please review.

Comparison is base (8ca9cc1) 30.05% compared to head (38d9310) 31.48%.

Files Patch % Lines
...ges/engine-formula/src/services/runtime.service.ts 7.40% 25 Missing ⚠️
...ngine-formula/src/functions/lookup/xmatch/index.ts 74.19% 16 Missing ⚠️
...ormula/src/engine/value-object/primitive-object.ts 36.36% 14 Missing ⚠️
...engine-formula/src/functions/lookup/match/index.ts 72.50% 11 Missing ⚠️
...es/engine-formula/src/models/formula-data.model.ts 78.72% 10 Missing ⚠️
...ine-formula/src/controller/calculate.controller.ts 0.00% 7 Missing ⚠️
...es/engine-formula/src/functions/date/date/index.ts 84.44% 7 Missing ⚠️
...c/engine/reference-object/base-reference-object.ts 60.00% 6 Missing ⚠️
...ngine-formula/src/functions/lookup/offset/index.ts 50.00% 6 Missing ⚠️
...ages/engine-formula/src/functions/base-function.ts 70.58% 5 Missing ⚠️
... and 26 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1295      +/-   ##
==========================================
+ Coverage   30.05%   31.48%   +1.43%     
==========================================
  Files         848      858      +10     
  Lines       48169    48627     +458     
  Branches     9892    10049     +157     
==========================================
+ Hits        14478    15312     +834     
+ Misses      33691    33315     -376     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Codecov Report

Attention: 75 lines in your changes are missing coverage. Please review.

Comparison is base (d8bc41a) 29.58% compared to head (87c82d6) 30.33%.
Report is 3 commits behind head on dev.

Files Patch % Lines
...es/engine-formula/src/models/formula-data.model.ts 11.62% 38 Missing ⚠️
...ges/engine-formula/src/services/runtime.service.ts 16.66% 20 Missing ⚠️
...ine-formula/src/controller/calculate.controller.ts 0.00% 7 Missing ⚠️
...c/engine/reference-object/base-reference-object.ts 60.00% 6 Missing ⚠️
...ands/mutations/set-numfmt-formula-data.mutation.ts 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1295      +/-   ##
==========================================
+ Coverage   29.58%   30.33%   +0.75%     
==========================================
  Files         841      845       +4     
  Lines       47754    47967     +213     
  Branches     9779     9818      +39     
==========================================
+ Hits        14129    14553     +424     
+ Misses      33625    33414     -211     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Dushusir Dushusir marked this pull request as ready for review January 31, 2024 06:39
@Dushusir Dushusir added the qa:untested This PR is ready to be tested label Jan 31, 2024
@Dushusir
Copy link
Member Author

Dushusir commented Jan 31, 2024

2024_1_31 14_59_23 video.webm
how to test formula with numfmt CC @zhaolixin7

@Dushusir Dushusir added qa:untested This PR is ready to be tested and removed qa:untested This PR is ready to be tested labels Jan 31, 2024
@Dushusir Dushusir force-pushed the dushusir/formulas-time branch 2 times, most recently from c533e6d to f50eb17 Compare February 2, 2024 06:05
@zhaolixin7
Copy link

1、公式=today(A1)预期报错,2、公式等于today的结果格式预期显示为日期?
2024_2_2 14_56_57 video.webm

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


  1. The formula =today(A1) is expected to report an error. 2. The result format of the formula equal to today is expected to be displayed as a date?
    2024_2_2 14_56_57 video.webm

@Dushusir Dushusir force-pushed the dushusir/formulas-time branch 2 times, most recently from 4784af8 to 9717891 Compare February 3, 2024 04:25
@Dushusir
Copy link
Member Author

Dushusir commented Feb 3, 2024

  1. 修复 =TODAY(A1) 传入了不应该有的参数 报 #N/A ,也修复了其他函数,如果未传必需参数就报错(参考Google)。 DATE(2020.1,1) 报错提示,本质上也是缺少必需参数问题。
  2. 修复 ABS 函数选择空白选区,应该等于 0
  3. 修复 A1 输入 =TODAY(),显示为日期。 B1 输入=A1 也要保留带过来日期格式
  4. 修复 CONCATENATE参数是空的结果是空的,参数是2个空单元格结果是空值,参数是2个0结果是00,有一个单元格有字符结果等于字符+0

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


  1. Fixed =TODAY(A1) reporting #N/A when parameters that should not be passed in, and also fixed other functions that reported errors if required parameters were not passed (refer to Google). DATE(2020.1,1) error message is essentially a problem of missing required parameters.
  2. Fix the ABS function to select a blank selection, which should be equal to 0
  3. Fix A1 input =TODAY() to display as date. B1 input=A1 also needs to retain the date format brought over.
  4. Repair the CONCATENATE parameter is empty, the result is empty, the parameter is 2 empty cells, the result is empty, the parameter is 2 0, the result is 00, there is a cell with characters, the result is equal to character + 0

@Dushusir Dushusir force-pushed the dushusir/formulas-time branch 3 times, most recently from 2affadc to f68e4b3 Compare February 7, 2024 09:49
@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Feb 19, 2024
@zhaolixin7 zhaolixin7 added the qa:untested This PR is ready to be tested label Feb 19, 2024
@zhaolixin7 zhaolixin7 added qa:verified This PR has already by verified by a QA and is considered good enough to be merge and removed qa:untested This PR is ready to be tested labels Feb 20, 2024
@Dushusir Dushusir merged commit f069dd8 into dev Feb 20, 2024
7 checks passed
@Dushusir Dushusir deleted the dushusir/formulas-time branch February 20, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants