Bug 327228 - When configured to "Show the files related to the current activity" folderview shows the files of the wrong activity
Summary: When configured to "Show the files related to the current activity" foldervie...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-folderview (show other bugs)
Version: 4.11.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Ignat Semenov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 14:20 UTC by augusto
Modified: 2018-06-08 19:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description augusto 2013-11-06 14:20:31 UTC
This happens either if the folderview is used as a widget or as desktop layout. The url "activities:/current/" in Dolphin works as expected. This feature used to work in KDE SC 4.10.*, but since the upgrade to KDE SC 4.11 I have this bug.

Reproducible: Always

Steps to Reproduce:
1. Create two activities: e.g. "Work" and "Fun";
2. Configure the Desktop in both activities using "Folder" layout;
3. Configure the "Location" of each desktop to "Show the files related to the current activity";
4. Open Dolphin and link some files to "Work" activity (Right click > Activities) and some files to "Fun" activity;
5. Switch from the activity "Fun" to "Work" and vice versa.
Actual Results:  
The files shown in desktop doesn't change when switching activity. For instance you see the files related to "Work" in the "Fun" activity. Hitting F5 doesn't help.
Opening Dolphin and going to url "activities:/current/" I can see the right set of files.

Expected Results:  
When switching activity I expect to see the correct set of files (those I linked to the activity I switched to) on the Desktop.

This feature used to work in KDE SC 4.10.*. I'm on Kubuntu 12.04 LTS with KDE SC 4.11.2 installed from Kubuntu Backports PPA.
Comment 1 Michael Tils 2013-11-26 07:16:32 UTC
Same here on OpenSUSE 13.1 under KDE 4.11.3.
A workaround is to use the direct link to the current activity. (Something like that: activities:/f81738a3-1a0e-443d-abae-5d70a49e0632/)
Due to the fact you need to re-add a folderview to every activty this is fine for me. But the behaviour to set a folderview to "Current Activity" is defenetly broken. And here it doesn't matter if you say "Current Activty" through its radio buttons or paste "activities:/current" into the textinput of the folderview.
I guess it has something to do with a cache. If you change something in the folderview of one activity the others are also changed as long as you have the same url (in this case activities://current) in this folderviews.
So it looks to me like someone said: "Generate a cache-id of path X because the contents of all folderviews have to be the same if the path is the same". But thats just guessing. I am a coder but haven't really an idea of C++.
Comment 2 augusto 2013-11-26 09:44:22 UTC
Thank you Micheal !!
I confirm that the workaround you suggested works also for me. I'll expand it a little bit:

Get the current activity id writing the following command in a teminal:

qdbus org.kde.ActivityManager /ActivityManager/Activities CurrentActivity

This will return a long string like e9f2d03d-39b0-45dd-a022-90d8173df302.

Go in the Folderview settings > Location tab, select "Specify a folder" and write this:

activities:/e9f2d03d-39b0-45dd-a022-90d8173df302/

Click Ok. Repeat this for all your activities/folderviews.

I really hope that this bug will be addressed, because the workaround is not very user friendly. :)
Comment 3 Michael Tils 2013-11-26 10:58:41 UTC
augusto: You're welcome. The way I retrieved the activity-ID was through:

1. Dolphin: activities:/ 
2. Then choosing the current activity
3. Copy the url from dolphins address bar

Which is longer then your dbus method ;-)
Comment 4 Nate Graham 2018-06-08 19:01:40 UTC
Hello!

This bug report was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this bug is already resolved in Plasma 5.

Accordingly, we hope you understand why we must close this bug report. If the issue described  here is still present in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham