fix: dopo l'unificazione messaggio rapido e nota, non funzionava più la consuntivazione senza inserire oggetto o corpo.
This commit is contained in:
1 parent
44c89aa92f
commit
c33a7a4666
1 file changed
+6
-4
@@ -3755,14 +3755,16 @@ const TicketDetailView = {
|
||||
|
||||
// 2. Perform article note creation if note fields are populated
|
||||
if (hasNoteContent) {
|
||||
if (!noteBody && noteSubject) {
|
||||
if (!noteSubject && !noteBody) {
|
||||
noteSubject = 'consuntivazione';
|
||||
noteBody = '<p>consuntivazione</p>';
|
||||
} else if (!noteBody && noteSubject) {
|
||||
noteBody = `<p>${App.escapeHtml(noteSubject)}</p>`;
|
||||
}
|
||||
if (noteBody && !noteSubject) {
|
||||
} else if (noteBody && !noteSubject) {
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = noteBody;
|
||||
const plainText = tempDiv.textContent || tempDiv.innerText || '';
|
||||
noteSubject = plainText.trim().substring(0, 50) || 'Nota interna';
|
||||
noteSubject = plainText.trim().substring(0, 50) || 'consuntivazione';
|
||||
}
|
||||
|
||||
const resNote = await App.api(`/api/tickets/${this.ticketId}/articles`, {
|
||||
|
||||
Reference in new issue
Block a user