In (at least) AgreementsList we are calling fetchAgreements which fetch all the agreements, to know if we display the table (that will fetch again the first X agreements). We need a fetchCountAgreements (similar to fetchCountLocalPackages) instead. I think we discussed that already somewhere else. Anyone willing to provide a patch to make their grip on Vue and the ERM module?
(In reply to Jonathan Druart from comment #0) > Anyone willing to provide a patch to make their grip on Vue and the ERM > module? I don't really know anything about the ERM, but one of these days I do plan to get to grips with Vue. Probably not this patch though [U+1F605]
Created attachment 147111 [details] [review] Bug 32807: Fetch count instead of all entries for agreements and licenses To list agreements and licenses we are retrieving the whole list to simply know if at least one exists (and display the table that will fetch the X first elements to display). We should call count instead. Test plan: List agreements and licenses. If none exists, the table is not displayed but a "There are no... defined" message instead. If at least one exists the table must be there
Created attachment 147115 [details] [review] Bug 32807: Fetch count instead of all entries for agreements and licenses To list agreements and licenses we are retrieving the whole list to simply know if at least one exists (and display the table that will fetch the X first elements to display). We should call count instead. Test plan: List agreements and licenses. If none exists, the table is not displayed but a "There are no... defined" message instead. If at least one exists the table must be there Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Created attachment 148654 [details] [review] Bug 32807: Fetch count instead of all entries for agreements and licenses To list agreements and licenses we are retrieving the whole list to simply know if at least one exists (and display the table that will fetch the X first elements to display). We should call count instead. Test plan: List agreements and licenses. If none exists, the table is not displayed but a "There are no... defined" message instead. If at least one exists the table must be there Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Created attachment 148851 [details] [review] Bug 32807: Fix cypress tests Cypress tests were failing, not sure I understand why exactly as I don't recreate the failure when using the interface. We could simplify the if logic anyway.
Created attachment 148894 [details] [review] Bug 32807: Fix cypress tests Cypress tests were failing, not sure I understand why exactly as I don't recreate the failure when using the interface. We could simplify the if logic anyway. Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Follow-up pushed to master. Thanks for the quick fix, guys!
Nice work everyone! Pushed to stable for 22.11.x
Missing dependencies for 22.05.x, no backport
*** Bug 32494 has been marked as a duplicate of this bug. ***