SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.92k stars 1.23k forks source link

sap.m.UploadSet removeIncompleteItem() does not remove the last items #4029

Open T0bbes opened 3 months ago

T0bbes commented 3 months ago

Hi Guys,

We use the Document Upload to upload N documents in the "IncompleteItems" aggregation and process them in sequence. When a document has been edited, it should be deleted from the aggregation. As we have problems with the two aggregations "items" and "incompleteItems", we use both "remove" methods as a precaution.

All but the last item are deleted. This remains despite calling the two remove methods.

OpenUI5 version: 1.120.8

Browser/version (+device/version): Chrome Version 124.0.6367.61 (Official Build) (arm64)

Steps to reproduce the problem:

  1. Upload multiple document as incomplete item
  2. Remove items with oUploadSet.removeIncompleteItem(oSelectedItem.item); and oUploadSet.removeItem(oSelectedItem.item);
  3. Last items remains

What is the expected result? Last item should be removed

What happens instead? Last item remains in the list

Any other information? (attach screenshot if possible) I think the reason is that the getItems only fetches the "completedItems" and does not find the incompletedItems. We set the items to completed, but that doesn't change anything, as the items still remain incomplete. see #4027

SCR-20240422-nrrh
NHristov-sap commented 3 months ago

Hi @T0bbes ,

It seems that the reported behavior is caused by the issue reported by #4027 (as you mention). So I will add this issue to the internal issue created for #4027 (DINC0129133).

Best Regards, Nikolay Hristov UI5 GitHub Dispatcher

chnaahmad commented 2 months ago

Any update regarding this issue, we are also facing the same problem.