You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "pankajsoni22 (via GitHub)" <gi...@apache.org> on 2024/05/27 04:32:21 UTC

[I] [Bug] Unable to edit mail list of existing alert & reports [superset]

pankajsoni22 opened a new issue, #28709:
URL: https://github.com/apache/superset/issues/28709

   ### Bug description
   
   When we create alert or report and want to sent to receivers using their mail id, it is working fine, we can create alerts and report successfully. 
   
   BUT
   
   If we want to add more recipients and try to edit and add more mail to alerts or reports it is not possible. looks like after saving alert/report the mail list edit area becomes read-only. 
   
   ### How to reproduce the bug
   
   1. Go To "Alerts & Reports"
   2. Click on edit button of some already existing Alert/Report
   3. Try to remove or add mail, you won't be able to do so.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.0.1
   
   ### Python version
   
   I don't know
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   I'm using superset 4.0.1-dev version
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "mitchgreen (via GitHub)" <gi...@apache.org>.
mitchgreen commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2136582591

   I too am having this same issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "aibunny (via GitHub)" <gi...@apache.org>.
aibunny commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2132981628

   I also experienced a similar issue it looks like a frontend issue since the Add button is not activated when I have satified all the requirements to create an alert.
   <img width="1512" alt="Untitled" src="https://github.com/apache/superset/assets/98146814/e73b221e-6d9f-4328-8962-73a9182920c6">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "aibunny (via GitHub)" <gi...@apache.org>.
aibunny commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2132985275

   @pankajsoni22 could share the configs you used for the email alerts I am not able to setup mine I keep getting `report schedule refusing to compute`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2132628429

   <!-- Greeting -->
   Hello, @pankajsoni22! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding the repository.
   
   <!-- Answer -->
   To resolve the issue in Superset version 4.0.1-dev where you are unable to edit the mail list of existing alerts and reports because the mail list edit area becomes read-only after saving, you need to ensure that the `NotificationMethod` component allows for updates to the notification settings. The provided code already includes the necessary logic to handle updates to the notification settings.
   
   Here is the relevant part of the code that handles the update of notification settings:
   
   ```tsx
   const updateNotificationSetting = (
       index: number,
       setting: NotificationSetting,
     ) => {
       const settings: NotificationSetting[] = [...notificationSettings];
       settings[index] = setting;
   
       // if you've changed notification method -> remove trailing methods
       if (notificationSettings[index].method !== setting.method) {
         notificationSettings[index] = setting;
   
         setNotificationSettings(
           notificationSettings.filter((_, idx) => idx <= index),
         );
   
         if (notificationSettings.length - 1 > index) {
           setNotificationAddState('active');
         }
   
         if (setting.method !== undefined && notificationAddState !== 'hidden') {
           setNotificationAddState('active');
         }
       } else {
         setNotificationSettings(settings);
       }
     };
   ```
   
   This function updates the notification settings when a change is made. Ensure that this function is correctly called when the notification settings are updated in the `NotificationMethod` component.
   
   Additionally, ensure that the `NotificationMethod` component is correctly passing the updated settings back to the parent component:
   
   ```tsx
   <NotificationMethod
     setting={notificationSetting}
     index={i}
     key={`NotificationMethod-${i}`}
     onUpdate={updateNotificationSetting}
     onRemove={removeNotificationSetting}
     onInputChange={onInputChange}
     email_subject={currentAlert?.email_subject || ''}
     defaultSubject={emailSubject || ''}
     setErrorSubject={handleErrorUpdate}
   />
   ```
   
   If the issue persists, verify that the state updates are correctly propagated and that there are no other parts of the code that might be causing the mail list edit area to become read-only <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/alerts/AlertReportModal.tsx)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   <details open>
   <summary>
   
   #### Details
   </summary>
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
   </details>
   
   *To continue the conversation, mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #28709:
URL: https://github.com/apache/superset/issues/28709#issuecomment-2138154323

   I believe this is a duplicate of https://github.com/apache/superset/issues/28149 which was fixed in https://github.com/apache/superset/pull/28409. The next release -- either 4.1.0 or 4.0.2 -- should have this fix incorporated.
   
   If you believe this is different than the issue I linked, please feel free to comment and I'll reopen.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Bug] Unable to edit mail list of existing alert & reports [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke closed issue #28709: [Bug] Unable to edit mail list of existing alert & reports
URL: https://github.com/apache/superset/issues/28709


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org