Add work notes through Ticket Conversations widget (Service Portal)

Simon Ciglia
Giga Guru

Dear experts

In additional to comments I need an additional field so that everybody can post work_notes through the Ticket Conversations widget.

 

What I tried
HTML

  <!-- work notes -->
      <form ng-submit="postEntry(data.workNoteEntry)" id="sand">
        <div ng-show="::data.primaryJournalField" class="input-group">
          <textarea ng-keypress="keyPress($event)"
                    sn-resize-height="trim"
                    rows="1" id="post-input"
                    class="form-control no-resize overflow-hidden"
                    ng-model='data.workNoteEntry'
                    ng-model-options='{debounce: 250}'
                    ng-attr-placeholder="Internal comment"
                    autocomplete="off"
                    ng-change="userTyping(data.workNoteEntry)"/>
          <span class="journal-field-indicator" ng-style="({'background-color': data.useSecondaryJournalField ? data.secondaryJournalField.color : data.primaryJournalField.color})"></span>
          <span class="input-group-btn" style="vertical-align: top">
            <input type="submit" class="btn btn-primary" value="{{data.btnLabel}}" ng-disabled="data.isPosting"/>
          </span>
        </div>
        <div ng-if="::(data.secondaryJournalField && data.secondaryJournalField.can_write)">
          <label class="pull-right"><input type="checkbox" ng-model="::data.useSecondaryJournalField" ng-change="updateFormWithJournalFields()"/> {{::data.secondaryJournalField.label}}</label>
        </div>
      </form>

Server

	if (input) { // if we have input then we're saving
		if (input.journalEntry && input.journalEntryField){
			if (gr.canWrite(input.journalEntryField)){
				gr.setDisplayValue(input.journalEntryField, input.journalEntry);
				gr.update();
				$sp.logStat('Comments', data.table, data.sys_id, input.journalEntry);
			}
		}
		else if (input.workNoteEntry){
			gr.work_notes = input.workNoteEntry;
			gr.update();
		}



Thank you in advance for your help

Cheers

Simon

1 ACCEPTED SOLUTION

SatheeshKumar
Kilo Sage

are you facing any issues in doing this?

View solution in original post

3 REPLIES 3

SatheeshKumar
Kilo Sage

are you facing any issues in doing this?

I do not know why this was marked as the correct answer when it's not. But what the guy was asking was how do you make the work notes seen by all users instead of just by the user who wrote the work note. Right now the only person who can see the work notes is the user who posted the work note. The requestor does not see it. What my question is, is why does everyone need to see the work notes? Isn't that what the customer comments are for?

I too need same help

if anybody achieve this please help me