OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
685 stars 95 forks source link

Changing colorscale criteria causes Conditional formatting rule to break #4898

Open jkpieterse opened 1 month ago

jkpieterse commented 1 month ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

Color scale maximum formula changes to CFSetting456_2 and conditional format keeps working

Current behavior

The maximum formula is changed, but the CF rule no longer works After manually editing the CF rule, it starts working again.

Steps to reproduce

  1. Open this document: https://1drv.ms/x/s!AslIeJys_KO0hLUtAgeMDZd84wsDAw?e=cbXJq4
  2. In Script lab, add this script: https://1drv.ms/t/s!AslIeJys_KO0hLUuLBfDtr_vWE-z2w?e=bV0oVE
  3. Run the routine

Link to live example(s)

See prev step

Provide additional details




Context

This makes it impossible to modify existing conditional formatting rules from office-js

Useful logs

Also see this post on s.o.: https://stackoverflow.com/questions/78931408/trying-to-edit-a-colorscale-conditional-format-rule

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

shanshanzheng-dev commented 1 month ago

Hi @jkpieterse Thanks for reporting this issue. We'll take a look and report back if we have a suggestion for you.

jkpieterse commented 1 month ago

Thanks. I can also confirm the issue also happens if I run close to identical code from VS Code: the formula property is changed, but the CF rule ceases to work until I go in and do a bogus edit.

jkpieterse commented 1 month ago

To add to this: The IconSet conditional formatting object suffers from the same problem.

RuizhiSunMS commented 1 week ago

Created #9349518 to trach this case. The team will investigate and we will reply to you as soon as there is any progress. Thank you for your patience.