2 Replies Latest reply on Aug 21, 2013 3:26 PM by Brian.Dailey

    Incident notes added by incident task


      Is there away to add notes to the incident based on task process.


      How could you add a note to an incident window based on task process where by a person enter information into the task and it creates the note on the incident tree if this is even possible.  Reason for this is help desk are working with the tasks based on the incident and instead of the technician going through all the tasks attached and there notes I would just like them to see the notes coming through on the incident window tree.


      Alternatively as a fallback a Tab showing the notes from tasks would work, but I would rather the above option.



        • 1. Re: Incident notes added by incident task

          I'm also interested in this as an option - anyone worked out how to do it?

          • 2. Re: Incident notes added by incident task

            Hi Shaun,


            Rather than duplicate all the data, you can add an attribute to Incident and use a calculation to pull all that into one HTML field for display at the Incident level (using a .  I've created something similar to show the LATEST update on a ticket out of Notes/Tasks/TaskNotes.  You could probably adjust it to fit your purposes too, just have it build the detail rather than selecting only the most recent item.


            Here's my current calc for LatestUpdate if you want to try it (as AfterRead):



            import System
            static def GetAttributeValue(Incident):
                 Value = ""
                      if Incident.Notes.Count>0:
                           Current = Incident.Notes.Latest()
                      if Incident.Tasks.Count>0:
                           LatestTask = Incident.Tasks.Latest()
                           if LatestTask.CreationDate > Current.CreationDate:
                                Current = LatestTask
                           for t in Incident.Tasks:
                                if t.Notes.Count>0:
                                     if t.Notes.Latest().CreationDate > Current.CreationDate:
                                          Current = t.Notes.Latest()
                      if LUtype == "TASK":
                           Snippet = Current.Description.Substring(0,500)
                           Snippet = Current.Text.Substring(0,500)

                      Value = String.Format("<strong>[Update by {0}/{1}] ({2})::::</strong> {3}", Current.CreationUser.Title, LUtype, Current.Title, Snippet)

                 except e as Exception:
                      return Value
                 return Value