Improve log clone message

I noticed this while chatting with @AmberS and created a feature request in the log module: Add link to cloned logs in status message [#3358971] |

After cloning one or more logs a status message is displayed: “Cloned {#} logs.” If the user is cloning a few particular logs in a site that has many existing logs it is easy to “lose” the newly cloned logs (in farmOS this commonly happens from the log table view). An easy solution would be to include links to the newly cloned log(s) in the status message and maybe include a link to the original log as well.

Raising this here in forum to ask what would others would find most useful as well. Is including links to each cloned log in the status message most useful? Would you like a link to the original log? What is the best way to phrase an updated status message? Other ideas?

Screenshot from 2023-05-08 15-17-04

1 Like

Only thought that comes to mind is: what happens if you bulk select a large number of logs and clone them all? Would that be too many status messages? Although maybe that’s too hypothetical and wouldn’t really happen in practice.

I regularly clone 3-4 logs at a time then need to go back and make changes to them all. For me this is typically weekly feedings of all my animals. Same log with just different quantities. Having links to all the logs right after cloning would be super useful for making the subsequent changes needed.

What I would find more useful though is in the status message after saving a log a button to clone that same log again. I typically do all my record keeping once a week into farmOS so there ends up being a lot of cloning of the same log over and over again right in a row.


Is it possible to have an url in the status message that points to a table view of all the cloned messages?

Then up to 5 or so, could be listed in the message. Or bring up the table view if there was too many…


Good question @pat. If there was some way to query “cloned logs” in the database, we could just create a page like /logs/cloned or something, and sort by most recent (log timestamp? time of cloning?) and provide a link to that from the status message. I don’t think the database stores a record of the fact that a log was cloned, however. Adding that would require a database change as well.

It’s probably easiest to just implement this the simple way to start (show all status messages), and only solve this if it becomes an issue.


Also, if we are going to do this we should make an equivalent PR/MR for the asset clone action (farmOS/AssetClone.php at 2.x · farmOS/farmOS · GitHub) and merge them at the same time, for consistency.