• Anonymous
  • Login
  • Register
!!HELP!! - Defect: BODY is not transferred to new ticket

Created on Apr 3, 2005
Created by Ulrich Krause
Status Fixed
Release 1.0.7

When creating a ticket from an email, the BODY field is not transferred to the new ticket



Taken Actions by Owners

Defect has been fixed.

Fixed in Release 1.0.8

To fix this issue pls. replace the CreateNewTicket Function in lib.appl.functions with this code


Function CreatenewTicket(me_db As NotesDatabase, me_doc As notesdocument) As Boolean
%REM
###################################################################################
Goal: This function creates a new Ticket out of a mailed document

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arguments: Description:
me_db Notesdatabase The Calling Notes DB
me_doc Notesdocument the document that is worked on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Return:
boolean true or false if there was an error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example:
ok = CreatenewTicket(db,doc)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERSION / WHEN / WHO / CHANGES
1.0/24.03.2005/Thomas Schulte/none
1.1/4.04.2005/eknori/ErrorHandling for fields
'###################################################################################
%END REM
Dim newticket As NotesDocument
Dim item As NotesItem
Dim rtitem As NotesRichTextItem
Dim rtBodyNewTicket As NotesRichTextItem
Dim problem As String
Dim plainText As String

Const NEW_LINE = Uchr$(13)

On Error Goto ErrorHandler
createnewticket = True

Set NewTicket = New NotesDocument( me_db )
If me_doc.HasItem("From") Then
Set item = me_doc.GetFirstItem( "From" )
Call item.CopyItemToDocument ( NewTicket, "User")
End If
If me_doc.HasItem("CopyTo") Then
Set item = me_doc.GetFirstItem( "CopyTo" )
Call item.CopyItemToDocument ( NewTicket, "OtherUsers")
End If
If me_doc.HasItem("Body") Then
Set rtitem = me_doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
plainText = rtitem.GetFormattedText( False, 0 )
End If
Problem = Left$(plainText,100)
Set rtBodyNewTicket = New NotesRichTextItem ( NewTicket, "Body" )
Call rtBodyNewTicket.AppendRTItem( rtitem)
End If
If me_doc.HasItem("Subject") Then
Set item = me_doc.GetFirstItem ("Subject")
Set item = NewTicket.ReplaceItemValue("problem", item.Text & NEW_LINE & NEW_LINE & Problem)
End If
If me_doc.HasItem("DeliveredDate") Then
Set item = me_doc.GetFirstItem( "DeliveredDate" )
Call item.CopyItemToDocument ( NewTicket, "DateCreated")
End If
Set item = NewTicket.ReplaceItemValue ("Form", "BugReport")
Set item = NewTicket.ReplaceItemValue ("Status", "0")
Set item = NewTicket.ReplaceItemValue ("Rerouted", "0")
Set item = NewTicket.ReplaceItemValue ("transformed", "1")
Call NewTicket.Save (True,True)

TheEnd:
Exit Function

ErrorHandler:
CreatenewTicket = False
Print "CreatenewTicket: " & Trim$(Str$(Err)) & " on line " & Cstr(Erl) & ": " & Error$
Resume TheEnd


End Function


In this field you can enter the actual defect.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.