I’m doing some testing for the multi-farmOS instance, but I found a few bugs that were not multi-farm related. Posting here so they are captured:
- When I create a log and assign a user as ‘owner’, the log will appear on their “Upcoming Tasks” list. It also appears on my list as the person who created it (which IMO seems odd). But if I update the task and unassign that person from it, it remains on both of our “Upcoming Tasks” lists. I think there are two concerns:
- Bug: after unassigning it, the log should be removed from that person’s “Upcoming Tasks” list.
- Question: why is the log added to my “Upcoming Tasks” list at all? I wouldn’t expect that behavior, because while I am creating it I am actively assigning it to someone else.
- Question: ‘owner’ is an odd title… it seems it provides access (they can edit) and adds the item to their task list. Is there any distinction between assigning something to someone and giving them edit rights? Just curious on this, not critical for me personally.
- When I go to People → → Logs → Add Log, I would expect that the ‘owner’ would be pre-selected to that person since I’m adding a log ‘to them’. However, owner is none. I think this is pretty confusing. If it’s not possible to pre-select them, it’s probably best to simply remove the ‘Add Log’ option because the function is already present elsewhere, and the functionality doesn’t work as expected.
What is the intended behavior of “Upcoming Tasks” and ownership? I looked in the docs, but ownership wasn’t well described really. That might also help me better use this.
Thanks in advance for any responses!
1 Like
The “Upcoming Tasks” (and “Late Tasks”) dashboard blocks are farm-wide (and there is no concept of “multi-farm” in farmOS core). They do not filter to only show tasks assigned to the logged in user. To see that, click on your username and then click on the “Logs” tab.
This isn’t a bug. But I agree it would be great to add the ability to customize this. We’ve talked about making the dashboard customizable for a while. I think the best way forward is to do something like Use layout builder for farmOS dashboard, and then provide more dashboard “blocks” to choose from. Maybe we keep the existing “Upcoming Tasks” (and “Late Tasks”) blocks as-is, but add other ones that can be dropped in which filter to the assignee. That would allow use-cases where BOTH are shown (eg: “I am the manager of a small farm and I want to quickly see both my own tasks and the tasks assigned to others at a glance”).
2 Likes
I hit “Reply” before I was done - here are a few more thoughts… 
The “Owner” field on logs is only used for task assignment currently. It does not affect access at all.
Meanwhile, there are standard access permissions for view/edit/delete **own** [type] log
- but those don’t currently use the “Owner” field. Instead they use the uid
field, which is a hidden meta-attribute that represents the user who created the log in the first place. We’re really just getting these features for “free” from lower-level Drupal modules/patterns - but the “Owner” field is something that we added later (and is farmOS-specific).
I’d love to see these pieces unified somehow. We could either “hack” the existing permissions to also take “Owner” into account, or add new permissions that only use the “Owner” field. This might be nice because then you could mix and match - eg: maybe higher-level roles still have the ability to edit logs they created, but by assigning them they also grant some of those permissions to other users - there are questions with this of course… can the “Owner” add more owners? Or is that up to the creator? I suspect we would need a separate permission/setting for that. So yea… there’s some work to be done if we want to implement it! 
Sounds like another great feature request!
Worth noting: if you save a log without any owner then you will be automatically assigned as its owner.
1 Like
PS: Here is a relevant old feature request: https://www.drupal.org/project/farm/issues/3114232
That was closed as outdated because no one committed to working on it.
1 Like
Thanks for the replies. Yeah, now reading how it works, I think there was a bug in visibility of logs due to multi-tenant (since fixed) which made it appear like other users couldn’t see the task in the task list, which made it seem like the task list was somehow person-specific. I think that’s where I got lost.
I think for larger team task management, addressing the owner / view / edit / delete questions you raised are quite important. I haven’t used it (or seen it used even) in a real ‘production’ situation so I’d be guessing, but it’s possible there’s a good 80/20 solution with what’s there even.
Last question - what is the purpose of owner, if the task list doesn’t filter? Is there any default location / view / dashboard block that has tasks by owner?
1 Like
Yep! You can filter by Owner in all the lists of logs, and you can also go to /user/[id]/logs
to see a pre-filtered list.
Clicking on your username in the top right, then clicking on the “Logs” tab will take you to your list of logs quickly.