Order attached files by date in portal
I've upgraded the portal to version 8.9.5. Now, analysts complain about that they cannot sort the linked attachments based on their dates, neither in the form itself nor in the view that opens up when clicking the symbol beside the ticket number. At least, I haven't figured it out yet. In the old portal version 7.4.x, they could sort by date to know which mail attachment is the oldest and therefore initial mail. Now, they have to open all mail attachments to find the initial mail.
Is there a way to allow a sort order for attachments by date?
Ingrid
Best Answers
-
Brian_Wiest Customer Super IT Monkey ✭✭✭✭✭Actually I should note. v8.11.0.x was released. In this release the new title bar for tickets all have the attachment icon for easy access. So there you can leave the drag and drop and in the related items tab place the old control for sorting. I think I am going to do that for my analysts.6
-
Jeff_Lang Customer Ninja IT Monkey ✭✭✭✭we had the same complaint about the date/time attachments were added, and also not being able to see the full file name if it is too long, we've added the following to not only show the full file name, but also the date/time the attachments were added. on both the workitem pages and also the attachments popoutit still does not sort them in date/time order, but does at least make it easier to see when they were attachedCSS
/* Resize the File Attachment Icon / Expand the text displayed */<br>div.thumbnail-file {<br> height: 150px;<br> width: 150px;<br>}<br><br>div.thumbnail-caption {<br> height: auto !important;<br>}<br><br>div.thumbnail-caption span {<br> word-wrap: break-word;<br> white-space: normal !important;<br>}<br>
JS(function(){<br> app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {<br> formObj.boundReady(function () {<br> ModifyFileAttachmentThumbnails();<br> });<br> });<br> app.custom.formTasks.add('Problem', null, function (formObj, viewModel) {<br> formObj.boundReady(function () {<br> ModifyFileAttachmentThumbnails();<br> });<br> });<br> app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {<br> formObj.boundReady(function () {<br> ModifyFileAttachmentThumbnails();<br> });<br> });<br> app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {<br> formObj.boundReady(function () {<br> ModifyFileAttachmentThumbnails();<br> });<br> });<br> function ModifyFileAttachmentThumbnails() {<br> //modify thumbnails on popout window when clicking the attachment icon at the top<br> $('#viewAttachments').on('click', function() { setdatesonpopoutattachmentwindow();})<br> function setdatesonpopoutattachmentwindow() {<br> var $tnf2 = $('div.modal-body div div.fileattachment-list div.thumbnail-file div.thumbnail-caption span:not([class])')<br> for ( i = 0 ; i < $tnf2.length ; i++ ) {<br> i2 = i;<br> while ( i2 >= pageForm.viewModel.FileAttachment.length && i2 > 0) {<br> i2 -= pageForm.viewModel.FileAttachment.length;<br> }<br> $tnf2[i].append(' - ' + new Date(pageForm.viewModel.FileAttachment[i2].AddedDate).toLocaleString())<br> }<br> }<br> setTimeout( function() {<br> //modify attachemtn thumbnails on actual form<br> var $tnf1 = $('div.panel.panel-default div div.fileattachment-list div.thumbnail-file div.thumbnail-caption span:not([class])')<br> for ( i = 0 ; i < $tnf1.length ; i++ ) {<br> $tnf1[i].append(' - ' + new Date(pageForm.viewModel.FileAttachment[i].AddedDate).toLocaleString())<br> }<br> },250);<br> }<br>})();
5
Answers
name: "FileAttachments",
type: "fileAttachmentsDragDrop"
},
name: "FileAttachments",
type: "fileAttachments"
},
Most analysts like the possibility to drag&drop files. Taking it away would probably cause more protest.
Any chance of having both? For service requests, I would do the same modification, I guess in the Servicerequest.js.
name: "FileAttachments",
type: "fileAttachmentsDragDrop"
},
name: "FileAttachments",
type: "fileAttachments"
},