Closed automationgeekx closed 1 year ago
Hello @bg339,
How is the newTaskModalCallback
invoked?
From the repository i forked on bolt-js, this piece of code is from testing.
it('schedules a message to remind the user of an upcoming task if the due date is < 120 days in the future', async () => {
await testView(
modalViewPayloadSelectedDateAndTime,
newTaskModalCallback,
global.chatScheduleMessageMockFunc,
{
channel: modalViewPayloadSelectedDateAndTime.user.id,
post_at: expect.any(Number), // TODO: possibly beef up this test to check for a valid time
text: expect.stringContaining(
modalViewPayloadSelectedDateAndTime.view.state.values.taskTitle
.taskTitle.value,
),
},
);
});
it('posts a message to the user if the due date is > 120 days in the future', async () => {
await testView(
modalViewPayloadDueDateTooFarInFuture,
newTaskModalCallback,
global.chatPostMessageMockFunc,
{
text: expect.stringContaining('more than 120 days from'),
channel: modalViewPayloadSelectedDateAndTime.user.id,
},
);
});
Aside from that, it is not called within any other file
This would be an example on how its called
Hi @bg339, your two other questions are related to this one, right? If yes, my reply at https://github.com/slackapi/bolt-js/issues/1674#issuecomment-1343755780 should be the answer for your question. Does my answer make sense to you? If yes, would you mind closing all other (possibly duplicated) issues?
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.
Description
Describe your issue here.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
node version: v12.16.1 OS version(s): Amazon linux 2
Steps to reproduce:
1. 2. 3.
Expected result:
When user selects a channel, I want to update the view. Right now, when I select a channel, no value is returned. This is branched off of the node-tasks-app on the bolt-js github. The code i pasted at the bottom is the new-task-modal.js file and new-task.js file from that same bolt-js repository. I am using it as a baseline to create a polling application for slack. I want to be able to retrieve the channel name and also push a different view when the channel is selected.
Actual result:
The following line of code below is used for when there is an error. Where it says "selectedChannel", I want it to post the channel name. When I give the modal a case where this line of code would run, it says "undefined" where selectedChannel is.
text:
Sorry, but we couldn't set a reminder for ${selectedChannel}, as it's more than 120 days from now
,Attachments: