puridach-w commented on code in PR #26327:
URL: https://github.com/apache/superset/pull/26327#discussion_r1463000339
##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -888,6 +890,10 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
const parsedValue = type === 'number' ? parseInt(value, 10) || null :
value;
updateAlertState(name, parsedValue);
+
+ if (name === 'name') {
+ updateEmailSubject();
+ }
Review Comment:
First video:
https://github.com/apache/superset/assets/76474644/47df84ce-e7c1-4db9-b008-3b43b6c39592
From the first video, it can be observed that the Report or Dashboard name
changes whenever the _default value that's shown as a placeholder changes. The
need for two variables arises from the requirement to display the default
Subject name, and another one to store the customized name.
Second Video:
https://github.com/apache/superset/assets/76474644/bb024b5e-96e6-4323-ada7-cef981752341
As shown in the second video, initially when I customize the "Email subject
name", it changes again when I edit the report name. This is caused by using
only the currentAlert.subject_name as the placeholder and value for the "Email
subject name" field. Therefore, when the report name is changed, the "Email
subject name" field gets updated.
Do you think it's important to display the default email subject line?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]