Copilot commented on code in PR #18308:
URL: 
https://github.com/apache/dolphinscheduler/pull/18308#discussion_r3346643874


##########
dolphinscheduler-ui/src/views/projects/task/components/node/detail-modal.tsx:
##########
@@ -131,8 +131,8 @@ const NodeDetailModal = defineComponent({
     const restructureNodeData = (data: INodeData) => {
       if (!data?.id) {
         for (const item in projectPreferences.value) {
-          if (projectPreferences.value[item] !== null && item in data) {
-            Object.assign(data, { item: projectPreferences.value[item] })
+          if (projectPreferences.value[item] !== null) {
+            Object.assign(data, { [item]: projectPreferences.value[item] })
           }

Review Comment:
   This loop now assigns every non-null project preference key onto the task 
node model. The project preference JSON includes keys that are not part of 
`INodeData` (e.g. `tenant`, `alertGroups` from the project preference form), 
and the previous `item in data` guard prevented those from being added. 
Reintroduce the guard while keeping the computed property fix to avoid 
unintentionally expanding the node model with unrelated preference fields.



-- 
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]

Reply via email to