[ACE-4702] Documents remain selected when navigate into different folder Created: 19-Nov-15  Updated: 01-Dec-16  Resolved: 03-Dec-15

Status: Closed
Project: Alfresco One Platform
Component/s: Document Library, Shared Files
Affects Version/s: 5.1
Fix Version/s: Community Edition 201512 EA, 5.1

Type: Bug Priority: Critical
Reporter: Rodica Sutu Assignee: Closed Issues
Resolution: Fixed Votes: 0
Labels: triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Alfresco Share v5.1-SNAPSHOT
(r117981-b536, Aikau 1.0.39.1, Spring Surf 5.1-SNAPSHOT, Spring WebScripts 5.8, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)
Alfresco Enterprise v5.1.0
(r117982-b365) schema 9011


Attachments: JPEG File FilesSelectd.JPG    
Issue Links:
Dependency
Depends on MNT-15320 Document selection maintenance Closed
Related
is related to by MNT-13640 Share: Items remain selected after Mo... Closed
Build Number: ALF-EPACK-558
Affects:
User Interface

 Description   

Preconditions:
1.Alfresco started.
2.Any site is created (ex. Test1)
3.Any folder created in the document Library (Folder1.)
4.Some files added in the Document Library on the site created

Steps to reproduce:
1.Go to Document Library, select all documents and go to Selected Items>Copy To folder created (Folder 1)
2.Go to the folder created (Folder1) and selected all the documents and go to Selected Items> Delete

Actual Result:
In the warning message are displayed the documents from Document Library and from Folder 1.

Expected Result:
Only the document from the Folder 1 should be displayed in the warning pop-up displayed and all the items are deleted.

Note :This issue is not reproducing on Alfresco Enterprise v4.2.5(.1 r117800-b155) schema 6076



 Comments   
Comment by Brian Remmington [ 24-Nov-15 ]

Alan, please see previous comment from Kev. Does this ring any bells with the team?

Comment by Alan Davis [ 25-Nov-15 ]

A quick JQL query for "remain selected" in MNT found MNT-13640 and linked ACE-3957. The code was merged to SHARE trunk on 1 Apr r100950. It is still there.

This issue ACE-4702 looks like an additional case of the problem identified in MNT-13640. Reading the comments on the original MNT issue this is not expected behavior. Perhaps a similar fix could be applied here.

Assigning back to WebApps to investigate.

Comment by David Webster [X] (Inactive) [ 26-Nov-15 ]

This ticket is not fixed by the commit for MNT-13640. In fact, that code doesn't seem to work against a local build of Share/trunk@118669 - the condition in the final if block doesn't return true (I don't know why, I think it should):

	      _unselectFile: function DL__unselectFile(obj)
	      {
	          var objAction = obj.action;
	          if (objAction && (objAction == "fileCopied" || objAction == "fileMoved" || objAction == "folderCopied" || objAction == "folderMoved"))
	          {
	             if (this.selectedFiles[obj.nodeRef])
	             {
	                this.selectedFiles[obj.nodeRef] = false;
	             }
	          }
	      },

That bug aside, whilst that fix is useful for MNT-13640, I don't think it's the right solution for this ticket. It relies upon the user performing one of a limited subset of actions. It wouldn't work if the user performed a custom action, nor would it work if the user selected items and then navigated without performing an action.

I believe the correct fix for this ticket is to:
1) find out why the _unselectFile code isn't performing as it should & fix that
2) clear the selected file list upon navigation. (See my next comment for actual cause).

Comment by David Webster [X] (Inactive) [ 26-Nov-15 ]

I've just re-read Kevin Roast [X]'s comment and had a search. He's right this is likely definitely fall out from an MNT ticket: MNT-14362 . To be honest, I think the requirement in that ticket (that actions can be performed on items selected across multiple pages) is confusing and should be reverted.

Comment by David Webster [X] (Inactive) [ 26-Nov-15 ]

I had a chat with Alan Davis about this. He suggested raising a new MNT ticket to fix this all. So I did: MNT-15320

Generated at Mon Jul 13 10:15:54 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.