Bug 453110 - folderview to linked activity files does not work
Summary: folderview to linked activity files does not work
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: 22.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 397004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-28 02:58 UTC by Alexandre Pereira
Modified: 2022-11-18 20:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Pereira 2022-04-28 02:58:33 UTC
SUMMARY
Using the stable version of plasma, I have several folder views in various activities that show the files linked with current activity.

When switching to the git version of plasma, these folder views show empty. When reverting back to stable version, the files reappear.


STEPS TO REPRODUCE
1. add a folder view to the desktop 
2. set it to show "files linked to current activity"
3. link a file to current activity through dolphin

OBSERVED RESULT
the folder view does not show anything

EXPECTED RESULT
it should appear in the folder view of that activity
Comment 1 Robby Engelmann 2022-05-03 19:14:16 UTC
same here since perhaps 2-3 weeks...

Operating System: openSUSE Tumbleweed 20220502
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2
Kernel Version: 5.17.4-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO
System Version: Not Applicable
Comment 2 Alexandre Pereira 2022-05-04 17:47:39 UTC
btw I noticed that if I use kf5 git and plasma git, but kde-gear stable version ( especially dolphin and kio/kio-extras ), the bug doesn't happen.
Comment 3 Nate Graham 2022-06-25 19:05:27 UTC
*** Bug 397004 has been marked as a duplicate of this bug. ***
Comment 4 Fushan Wen 2022-06-27 03:08:32 UTC
Unfortunately nowadays almost no code contributors use activities anymore. So if someone has interest in fixing the bug, please submit a merge request.
Comment 5 alx.kuzza 2022-11-07 04:33:18 UTC
Confirmed, still an issue for Plasma 5.26.2-1.1

Sill a regression from previous version of Plasma.
Comment 6 alx.kuzza 2022-11-14 06:52:18 UTC
Commit
 0e8f100d64bb3799f167a9b47c8c3aaaebf7775a 
introduced this problem.
Comment 7 Nate Graham 2022-11-14 19:55:14 UTC
In what git repo?
Comment 8 alx.kuzza 2022-11-15 08:16:42 UTC
Project: kio-extras ..

This is a proposed change:
diff --git a/activities/KioActivities.cpp b/activities/KioActivities.cpp
index 96a139e68..23691943f 100644
--- a/activities/KioActivities.cpp
+++ b/activities/KioActivities.cpp
@@ -57,8 +57,11 @@ public:
         const auto fullPath = url.adjusted(QUrl::StripTrailingSlash).path();
         const auto path = QStringView(fullPath).mid(fullPath.startsWith(QLatin1Char('/')) ? 1 : 0);
 
-        if (activity) {
-            *activity = path.mid(0, path.indexOf(QStringLiteral("/")) - 1).toString();
+        if (activity && path.length() != 0) {
+            if (path.indexOf(QStringLiteral("/"))!=-1)
+                *activity = path.mid(0, path.indexOf(QStringLiteral("/"))).toString();
+            else
+                *activity = path.toString();
         }
 
         if (filePath) {

Tested locally. Working as expected in dolphin and folder view.
Comment 9 Nate Graham 2022-11-15 18:09:01 UTC
Awesome, please do feel free to submit a patch! I can help with anything.
Comment 10 alx.kuzza 2022-11-15 23:54:53 UTC
(In reply to Nate Graham from comment #9)
> Awesome, please do feel free to submit a patch! I can help with anything.

Well, cannot create a branch in that project to submit a MR :(
Comment 11 alx.kuzza 2022-11-15 23:56:18 UTC
(In reply to Nate Graham from comment #9)
> Awesome, please do feel free to submit a patch! I can help with anything.

My username in invent.kde.org is @smithey.
Comment 12 Nate Graham 2022-11-16 00:09:08 UTC
You fork the repo; it's the same as the GitHub workflow, if you're familiar with that. See https://community.kde.org/Infrastructure/GitLab#Submitting_a_Merge_Request.
Comment 13 Bug Janitor Service 2022-11-16 01:53:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/197
Comment 14 Nicolas Fella 2022-11-18 10:44:04 UTC
Git commit a1f961060a43dae6ddaea969efe2620fbb5fa06b by Nicolas Fella, on behalf of Alexander Kuznetsov.
Committed on 18/11/2022 at 10:43.
Pushed by nicolasfella into branch 'master'.

[activities] Fix showing associated files

M  +2    -2    activities/KioActivities.cpp

https://invent.kde.org/network/kio-extras/commit/a1f961060a43dae6ddaea969efe2620fbb5fa06b
Comment 15 Nicolas Fella 2022-11-18 10:45:35 UTC
Git commit 270f2487c824713304f8b227fb14fa7e0c5c369c by Nicolas Fella, on behalf of Alexander Kuznetsov.
Committed on 18/11/2022 at 10:44.
Pushed by nicolasfella into branch 'release/22.12'.

[activities] Fix showing associated files
(cherry picked from commit a1f961060a43dae6ddaea969efe2620fbb5fa06b)

M  +2    -2    activities/KioActivities.cpp

https://invent.kde.org/network/kio-extras/commit/270f2487c824713304f8b227fb14fa7e0c5c369c