-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(api-service): Workflow editor improvements #7682
base: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
if (variables.subscriber.isOnline) { | ||
toSchema.properties!.avatar = { type: 'boolean', default: true }; | ||
} | ||
|
||
if (variables.subscriber.isLastOnline) { | ||
toSchema.properties!.avatar = { type: 'string', format: 'date-time', default: new Date().toISOString() }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is odd with these two, we set the avatar property...
despite that, why do we want to allow setting these two values in the form? they are controlled by WS service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, we shouldn't allow setting the online fields in the to
schema.
WS controls these.
I am working on it now, and will remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about the test data during preview. We need to give users the ability to test these values especially if they use them in Show conditions.
apps/api/src/app/workflows-v2/usecases/build-test-data/build-workflow-test-data.usecase.ts
Outdated
Show resolved
Hide resolved
Return all subscriber fields as the test data.to field based on the variables used in the workflow and the steps that the workflow includes. That is, an SMS step requires a phone, an Email step an email and any other field should be present in the To test data object if it's used as a variable in the content of the workflow steps.
162e66c
to
20e480d
Compare
@novu/client
@novu/headless
@novu/node
@novu/notification-center
novu
@novu/providers
@novu/shared
commit: |
What changed? Why was the change needed?
This PR ensures that all the used subscriber fields in a workflow are rendered in the Trigger page in the "Send to" section
Screenshots