Autor Thema: BUGs: leere <<b:>> und andere User  (Gelesen 3039 mal)

Offline Lauff

  • Aktives Mitglied
  • ***
  • Beiträge: 144
  • Geschlecht: Männlich
BUGs: leere <<b:>> und andere User
« am: 11.01.06 - 14:36:05 »
Hallo,

ich glaube ich habe 2 Bugs gefunden:

1. Wenn ein Wert wie <<solution>> in einer Mailsignatur vorkommt, aber das Feld in dem Ticket noch leer ist, wird nicht nichts angezeigt (so wie es sollte) oder der Ausdruck <<solution>>.

2. Wenn ich kein Ticket aus der Ansicht neue Tickets übernehme, dann wird bei anderer User die LN-Mail des HELPsystems eingetragen. Auch nicht richtig.

Gruß
Sebastian
Gruß
Sebastian

Offline eknori

  • @Notes Preisträger
  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 11.730
  • Geschlecht: Männlich
Re: BUGs: leere <<b:>> und andere User
« Antwort #1 am: 11.01.06 - 14:42:02 »
Zitat
1. Wenn ein Wert wie <<solution>> in einer Mailsignatur vorkommt, aber das Feld in dem Ticket noch leer ist, wird nicht nichts angezeigt (so wie es sollte) oder der Ausdruck <<solution>>.

eigentlich als feature gedacht  ;D Dann sieht man wenigstens, daß an der Stelle etwas stehen müsste.
So bleibt der Text von der Syntax her erhalten
Egal wie tief man die Messlatte für den menschlichen Verstand auch ansetzt: jeden Tag kommt jemand und marschiert erhobenen Hauptes drunter her!

Offline Lauff

  • Aktives Mitglied
  • ***
  • Beiträge: 144
  • Geschlecht: Männlich
Re: BUGs: leere <<b:>> und andere User
« Antwort #2 am: 11.01.06 - 14:47:07 »
Also das übliche bug oder feature. Gut. Ich würde hier den Vorschlag machen, das es entweder nicht angezeigt wird oder das ein "N/A" oder "./." angezeigt wird. So macht das keinen guten eindruck.
Gruß
Sebastian

Offline Thomas Schulte

  • @Notes Preisträger
  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 4.388
  • Geschlecht: Männlich
  • Ich glaub mich tritt ein Pferd
Re: BUGs: leere <<b:>> und andere User
« Antwort #3 am: 11.01.06 - 14:56:40 »
OK Punkt eins kann man lösen. nur muss das Verhalten dann wieder definierbar sein. Also noch ein Konfigurationsdokument.

Punkt 2 ist schon gelöst. Dadurch das er alle Namen die im Sendto und Copyto eingetragen sind als OtherUsers einträgt ist da natürlich auch die Adresse der Helpdesk Datenbank mit drin an die das Teil gesendet wurde. Die Adressen die da nicht übernommen werden sollen muss man nur an der entsprechenden Stelle eintragen:
DispatcherRemoveNamesFromOtherUsers
is the trick pony.
Thomas Schulte

Collaborative Project Portfolio and Project Management Software

"Aber wo wir jetzt einmal soweit gekommen sind, möchte ich noch nicht aufgeben. Versteh mich recht, aufgeben liegt mir irgendwie nicht."

J.R.R.Tolkien Herr der Ringe, Der Schicksalsberg

OpenNTF Project: !!HELP!! !!SYSTEM!!  !!DRIVER!!

Skype: thomasschulte-kulmbach

Offline Lauff

  • Aktives Mitglied
  • ***
  • Beiträge: 144
  • Geschlecht: Männlich
Re: BUGs: leere <<b:>> und andere User
« Antwort #4 am: 11.01.06 - 14:58:57 »
gut das werde icham nächten Arbeitstag (Montag  O0) probieren.
Gruß
Sebastian

Offline baces

  • Aktives Mitglied
  • ***
  • Beiträge: 148
  • Geschlecht: Männlich
Re: BUGs: leere <<b:>> und andere User
« Antwort #5 am: 12.01.06 - 08:14:26 »
Wo ist den die richtige Stelle für diesen Parameter ?

Ich hab in der Konfiguration unter SYSTEMPARAMETER einen neuen Eintrag DispatcherRemoveNamesFromOtherUsers angelegt, im Feld Schlüsselwörter sind die Email-Adressen in allen notwendigen Formaten aufgelistet,  untereinander ohne Trennzeichen.

Leider ohne Erfolg  ???
BaCeS

Offline Thomas Schulte

  • @Notes Preisträger
  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 4.388
  • Geschlecht: Männlich
  • Ich glaub mich tritt ein Pferd
Re: BUGs: leere <<b:>> und andere User
« Antwort #6 am: 12.01.06 - 09:39:43 »
Dann sollte das auch funktionieren. Bei mir tut es das zumindest.
Thomas Schulte

Collaborative Project Portfolio and Project Management Software

"Aber wo wir jetzt einmal soweit gekommen sind, möchte ich noch nicht aufgeben. Versteh mich recht, aufgeben liegt mir irgendwie nicht."

J.R.R.Tolkien Herr der Ringe, Der Schicksalsberg

OpenNTF Project: !!HELP!! !!SYSTEM!!  !!DRIVER!!

Skype: thomasschulte-kulmbach

Offline Thomas Schulte

  • @Notes Preisträger
  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 4.388
  • Geschlecht: Männlich
  • Ich glaub mich tritt ein Pferd
Re: BUGs: leere <<b:>> und andere User
« Antwort #7 am: 12.01.06 - 09:56:59 »
Ok unter Umständen gibt es da doch einen Fehler. Prüf doch mal nach ob in der Lib.Appl.Functions in der Function CreateNewTicket folgender Code enthalten ist
Code
If sendtoflag = True And copytoflag = True Then
otherusers = Arrayappend(sendtoarray,copytoarray)
Elseif sendtoflag = True And Copytoflag = False Then
otherusers = sendtoarray
Elseif sendtoflag = False And Copytoflag = True Then
otherusers = copytoarray
Else
' raise an error because there should be at last one of this fields
Error 9999, "Neither sendto nor copyto field was found in the document. ID" + me_doc.UniversalID
End If
' remove all duplicate entrys and the Databases MailIn Name from the OtherUsers Field
'first the duplicate entrys
otherusers = Arrayunique(otherusers)
' then empty everything that is in a configuration document
thisvalues = Split(Lcase(getConfigdocbyKeyMultivalue("DispatcherRemoveNamesFromOtherUsers","~")),"~")
otherusers = Arrayreplace(otherusers,thisvalues,"")
' at last do a fulltrim to extinct all empty entrys
otherusers = Fulltrim(otherusers)
If otherusers(0)<> "" Then
Set item = New NotesItem( NewTicket, "OtherUsers", Otherusers  , NAMES )
End If

Wenn nicht muss der eingefügt werden und du brauchst noch ein:
Code
Dim thisvalues  As Variant
in den Dims.

Oder noch besser du ersetzt einfach die komplette Function durch das hier:
Code
Function CreatenewTicket(me_db As NotesDatabase, me_doc As notesdocument) As String
%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:
string UNID of the created document
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example:
UNID = CreatenewTicket(db,doc)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERSION / WHEN / WHO / CHANGES
1.0/24.03.2005/Thomas Schulte/none
1.1/4.04.2005/eknori/ErrorHandling for fields
1.2/06.06.2005/Thomas Schulte/Handling of two different document types (memo/Reply and newbugreport)
1.3/02.08.2005/Thomas Schulte/Creating info mail the same way the save event within the bugReoprt form does
1.4/28.09.2005/Thomas Schulte/added parsing for MessageClick
'###################################################################################
%END REM
Dim newticket As NotesDocument
Dim item As NotesItem
Dim sendtoitem As notesitem
Dim copytoitem As NotesItem
Dim rtitem As NotesRichTextItem
Dim rtBodyNewTicket As NotesRichTextItem
Dim problem As String
Dim plainText As String
Dim asubject As Variant
Dim namesfield As Variant
Dim uniquenumber As Variant
Dim maxProblemLength As Integer
Dim me_notesitem As NotesItem
Dim docmailsend As String
Dim evalstring As String
Dim evalvar As Variant
Dim isnotesuser As Boolean
Dim message As String
Dim messageClick As String
Dim messageintern As String
Dim messagestringsplit As Variant
Dim ok As Boolean
Dim me_String As String
Dim otherusers As Variant
Dim sendtoArray() As String
Dim copytoarray() As String
Dim thisvalues  As Variant
Dim sendtoflag As Boolean
Dim copytoflag As Boolean
Dim i As Integer
Const NEW_LINE = Uchr$(13)
On Error Goto ERRHANDLE
createnewticket = ""
Set NewTicket = New NotesDocument( me_db )
If me_doc.form(0) = "newBugReport" Then
' Copy the all the documents items into the new document
Call me_doc.CopyAllItems(newTicket,True)
Else
If me_doc.HasItem("From") Then
Set item = me_doc.GetFirstItem( "From" )
Call item.CopyItemToDocument ( NewTicket, "User")
End If
sendtoflag = False
copytoflag = False
If me_doc.HasItem("SendTo") Then
Set sendtoitem = me_doc.GetFirstItem( "SendTo" )
Redim sendtoarray(Ubound(sendtoitem.Values))
i= 0
Forall me_val In sendtoitem.Values
sendtoarray(i) = Lcase(me_val)
I=i+1
End Forall
Sendtoflag = True
End If
If me_doc.HasItem("CopyTo") Then
Set copytoitem = me_doc.GetFirstItem( "CopyTo" )
Redim CopyToarray(Ubound(copytoitem.Values))
i= 0
Forall me_val In copytoitem.Values
copytoarray(i) = Lcase(me_val)
I=i+1
End Forall
copytoflag  =True
End If
If sendtoflag = True And copytoflag = True Then
otherusers = Arrayappend(sendtoarray,copytoarray)
Elseif sendtoflag = True And Copytoflag = False Then
otherusers = sendtoarray
Elseif sendtoflag = False And Copytoflag = True Then
otherusers = copytoarray
Else
' raise an error because there should be at last one of this fields
Error 9999, "Neither sendto nor copyto field was found in the document. ID" + me_doc.UniversalID
End If
' remove all duplicate entrys and the Databases MailIn Name from the OtherUsers Field
'first the duplicate entrys
otherusers = Arrayunique(otherusers)
' then empty everything that is in a configuration document
thisvalues = Split(Lcase(getConfigdocbyKeyMultivalue("DispatcherRemoveNamesFromOtherUsers","~")),"~")
otherusers = Arrayreplace(otherusers,thisvalues,"")
' at last do a fulltrim to extinct all empty entrys
otherusers = Fulltrim(otherusers)
If otherusers(0)<> "" Then
Set item = New NotesItem( NewTicket, "OtherUsers", Otherusers  , NAMES )
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
' find the max melnth of the problem text
maxProblemLength = Cint(GetConfigDocByKey("MaxLengthProblemDescription"))
Problem = Left$(plainText,maxProblemLength)
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
End If
' Create the unique Number of the ticket
Uniquenumber = Evaluate(|@unique|)
Set item = NewTicket.ReplaceItemValue("ReqNumber",Uniquenumber)
' create the asubject field
asubject = CreateASubject(newticket,"ASubjectMail")
If Isarray( asubject) = True Then
Set item = NewTicket.ReplaceItemValue("ASubject",asubject)
End If
Set item = NewTicket.ReplaceItemValue ("Form", "BugReport")
Set Item = NewTicket.ReplaceItemValue("FormType","Ticket")
Set item = NewTicket.ReplaceItemValue ("Status", "0")
Set item = NewTicket.ReplaceItemValue ("Escalated", "0")
Set item = NewTicket.ReplaceItemValue ("Rerouted", "0")
Set item = NewTicket.ReplaceItemValue ("transformed", "1")
' build the reader and the authors field if necessary
If Ucase(GetConfigDocByKey("LockDocumentsgeneral"))="YES" Then
' create the readers field
namesfield = CreateNamesField(newticket,"LockDocumentsTicketReaders")
If Isarray( namesfield) = True Then
Set item = NewTicket.ReplaceItemValue("AReaders",namesfield)
item.IsReaders = True
End If
' create the authors field
namesfield = CreateNamesField(newticket,"LockDocumentsTicketAuthors")
If Isarray( namesfield) = True Then
Set item = NewTicket.ReplaceItemValue("AAuthors",namesfield)
item.IsAuthors = True
End If
End If
Call NewTicket.Save (True,True)
' Create a mail message because his is a new ticket
' Get the messages for this document
message = GetLanguageStringByKey(GetConfigDocByKey("Language"),"TICKET ACTIONS & STRINGS","msgTicketAssigned")
' split this string search the fields and reconnect it
Messagestringsplit = Split(Message,"~~")
Message = ""
For i = 0 To Ubound(Messagestringsplit) Step 1
messageintern = ""
If messagestringsplit(i) <> "" Then
If Left(messagestringsplit(i),1) = "&" Then
' This is a field get the value of that field
messageintern = itemtextexists(NewTicket,Right(messagestringsplit(i),Len(messagestringsplit(i))-1))
Else
messageintern = messagestringsplit(i)
End If
End If
Message = Message + messageintern
Next
' check if there
' Get the messages for this document
messageclick = GetLanguageStringByKey(GetConfigDocByKey("Language"),"TICKET ACTIONS & STRINGS","msgTicketClick")
' split this string search the fields and reconnect it
Messagestringsplit = Split(Message,"~~")
Messageclick = ""
For i = 0 To Ubound(Messagestringsplit) Step 1
messageintern = ""
If messagestringsplit(i) <> "" Then
If Left(messagestringsplit(i),1) = "&" Then
' This is a field get the value of that field
messageintern = itemtextexists(NewTicket,Right(messagestringsplit(i),Len(messagestringsplit(i))-1))
Else
messageintern = messagestringsplit(i)
End If
End If
Messageclick = Messageclick + messageintern
Next
'is a field that steers mail information sending
If itemTextExists(NewTicket,"fldMailIfNew") = True Then
Set me_notesitem = NewTicket.GetFirstItem("fldMailIfNew")
docmailsend = me_notesitem.text
Else
docmailsend = ""
End If
' doc.form = "BugReport"
' check if the user is a notes user because only this ones get documents with links
Evalstring = |@unique(@NameLookup ( [Exhaustive]; "| + newticket.user(0) + |" ;"FullName"))|
EvalVar = CheckAndEvaluate(Evalstring)
If Isempty(EvalVar) Then
isnotesuser = False
Else
isnotesuser = True
End If
' send the mail either as mail with link or as mail
If Ucase(GetConfigDocByKey ("NoNotification")) = "YES" Or docmailsend = "NO"  Or (Ucase(GetConfigDocByKey ("MailIfNewDocDispatcher")) <> "YES" And docmailsend = "")Then
' do not do anything
Else
If Ucase(GetConfigDocByKey ("MailIfNewDocDispatcherLink")) = "YES" And isnotesuser= True Then
BoolLink = True
Else
BoolLink = False
End If
' Send Mail
OK = Spoofmessage(_
GetConfigDocByKey("sendMailonBehalfof"),_
newticket.user, _
newticket.otherusers,_
message,_
messageclick,_
doc,_
"",_
GetConfigDocByKey("MailIfNewDocDispatcherBodyFieldName"),_
BoolLink,_
True,_
"BugReport",_
"IsNewMail")
End If
Createnewticket = newticket.UniversalID
EXITPOINT:
Exit Function
ERRHANDLE:
xProc = Getthreadinfo(LSI_THREAD_PROC)
xError = xProc  & ": " &Trim$(Str$(Err)) & " on line " & Cstr(Erl) & ": " & Error$
If UseOpenLog Then
Call LogError
Elseif LogScriptErrors Then
Call ThrowException ( xProc, xError  )
End If
Print xError   'In all cases
If ResumeMethodNext Then
Resume Next
Else
Resume EXITPOINT
End If
End Function
« Letzte Änderung: 12.01.06 - 10:15:35 von Thomas Schulte »
Thomas Schulte

Collaborative Project Portfolio and Project Management Software

"Aber wo wir jetzt einmal soweit gekommen sind, möchte ich noch nicht aufgeben. Versteh mich recht, aufgeben liegt mir irgendwie nicht."

J.R.R.Tolkien Herr der Ringe, Der Schicksalsberg

OpenNTF Project: !!HELP!! !!SYSTEM!!  !!DRIVER!!

Skype: thomasschulte-kulmbach

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz