I have a script to assign tasks to the job owner which works however I'm trying to get the task details completed successfully pop-up to display after each task owner .
I've tried all the variations I can find in the documentation but none seem to work. I've tried,
$taskData
$taskData.response_status.status
$taskData.response_status.messages[0].message
also tried all of these preceded by write-host and all produce the correct output when run through powershell but nothing is displayed when through the custom actions menu.
Code snippet of the task owner update is below
$update = @"
{"task":
{"owner":
{"name": "$jobowner",
"id": "$techID"
},
"group":{"name": "$($group.name)"
}
}
}
"@
$taskData = Invoke-RestMethod -Method Put -Uri $updUri -Headers $header -Body @{input_data=$update;format='json'} -ContentType "application/x-www-form-urlencoded"
write-host $taskData.response_status.messages[0].message
Any suggestions?