fix: Pass selectedOption parameter to performStatusChange function
Fixed scope issue where selectedOption variable was not accessible in performStatusChange(). Updated function signature to accept selectedOption as a parameter and updated both call sites to pass it. Resolves error: "selectedOption is not defined" when changing ticket status. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -420,7 +420,7 @@ function updateTicketStatus() {
|
||||
'warning',
|
||||
() => {
|
||||
// User confirmed, proceed with status change
|
||||
performStatusChange(statusSelect, newStatus);
|
||||
performStatusChange(statusSelect, selectedOption, newStatus);
|
||||
},
|
||||
() => {
|
||||
// User cancelled, reset to current status
|
||||
@@ -430,11 +430,11 @@ function updateTicketStatus() {
|
||||
return;
|
||||
}
|
||||
|
||||
performStatusChange(statusSelect, newStatus);
|
||||
performStatusChange(statusSelect, selectedOption, newStatus);
|
||||
}
|
||||
|
||||
// Extract status change logic into reusable function
|
||||
function performStatusChange(statusSelect, newStatus) {
|
||||
function performStatusChange(statusSelect, selectedOption, newStatus) {
|
||||
// Extract ticket ID
|
||||
let ticketId;
|
||||
if (window.location.href.includes('?id=')) {
|
||||
|
||||
Reference in New Issue
Block a user