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

QA observation Bugfix/FOUR-14948: Clear Task Button in Inbox Rules page does not clear Date and Datetime fields #1569

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default {
VueFormRenderer
},
props: {
clearTask: { type: Boolean, default: false},
initialTaskId: { type: Number, default: null },
initialScreenId: { type: Number, default: null },
initialRequestId: { type: Number, default: null },
Expand Down Expand Up @@ -121,6 +122,14 @@ export default {
};
},
watch: {
clearTask: {
handler() {
if (this.clearTask) {
this.prepareTask();
}
}
},

initialScreenId: {
handler() {
this.screenId = this.initialScreenId;
Expand Down Expand Up @@ -328,8 +337,12 @@ export default {
this.resetScreenState();
this.requestData = _.get(this.task, 'request_data', {});
this.loopContext = _.get(this.task, "loop_context", "");

if (this.task.draft) {
//If Clear Task button is clicked from Inbox Rule page
if(this.clearTask) {
this.task.draft.data = {};
}
this.requestData = _.merge(
{},
this.requestData,
Expand Down
Loading