dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] Sub-workflow uses system current date instead of main workflow's data supplement date for $[yyyy-MM-dd-1] parameter

Open VanYue opened this issue 7 months ago • 0 comments

Search before asking

  • [x] I had searched in the issues and found no similar issues.

What happened

When performing data supplement on the main workflow, the main workflow correctly resolves the built-in time parameter $[yyyy-MM-dd-1] based on the supplement date selected by the user. However, the sub-workflow does not inherit this business date. Instead, it resolves $[yyyy-MM-dd-1] using the system's current date (the actual day the workflow runs), which makes data supplement incorrect.

What you expected to happen

Expected behavior: Sub-workflow should inherit the business date (supplement date) from the main workflow, and resolve $[yyyy-MM-dd-1] based on that business date, not the system's current date.

Actual behavior: Sub-workflow ignores the supplement date context and uses the system's current date to resolve built-in time parameters.

How to reproduce

Main workflow:

SQL task: select '${sd}'

Parameter sd: $[yyyy-MM-dd-1] (type: varchar)

Sub-workflow:

SQL task: select '${sd}'

Parameter sd: $[yyyy-MM-dd-1] (type: varchar)

Trigger:

Run data supplement on main workflow with date 2026-04-08

Check main workflow log → 2026-04-07 ✅

Check sub-workflow log → 2026-04-08 (if today is 2026-04-09) ❌

Anything else

No response

Version

3.4.1

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

VanYue avatar Apr 09 '26 07:04 VanYue