IRC logs for #farmOS, 2023-05-12 (GMT)

2023-05-11
2023-05-13
TimeNickMessage
[01:12:08]* explore has joined #farmos
[05:50:43]<Ujeeee[m]>Hi, I clone my plant assets, so many times, and the name has "clone" in it, so I try to rename them all from mysql with adminer, but it won't change in farmOS, I do this because I don't know how to import from csv files.
[07:40:22]<mstenta[m]>Ujeeee: It's not a good idea to make changes to farmOS data directly in the database. For one reason, it is stored in multiple places, like the revisions table as well. Also, Drupal may need to run additional logic when changes are made to make sure they propagate everywhere they need to. It is better to use Drupal's PHP APIs or the JSON:API to make changes because then you can be sure those things will happen.
[07:41:02]<mstenta[m]>Drupal also caches a lot of information, which may explain why you didn't see the change appear immediately when you modified the database directly. Drupal takes care of invalidating caches as needed when data is changed through its APIs.
[07:57:27]<Ujeeee[m]><mstenta[m]> "Ujeeee: It's not a good idea..." <- thanks for answering my question. I delete all my assets clone, for now I will just use inventory.
[07:58:08]<mstenta[m]>If you are familiar with Python, there is an example in here for importing assets via CSV: https://farmos.org/blog/2023/quick-intro-to-python-scripting
[08:06:07]<Ujeeee[m]><mstenta[m]> "If you are familiar with Python,..." <- thanks for the info, but for now I think this inventory is enough.
[08:52:42]<Ujeeee[m]>The things I don't understand regarding assets in farmOS is "how to put assets in an asset?". I can't find field for this. There is only "parent".
[08:54:00]<mstenta[m]>Ujeeee: Do you mean how do you move one asset to another? This might help: https://farmos.org/guide/location/
[08:54:25]<mstenta[m]>This too: https://farmos.org/blog/2022/getting-started
[08:57:33]<Ujeeee[m]>ACTION uploaded an image: (31KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/iQViSqlgQgc... >
[08:57:42]<Ujeeee[m]>I mean this location field
[08:58:51]<Ujeeee[m]>ACTION uploaded an image: (30KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/imrpohPSqhU... >
[08:58:51]<Ujeeee[m]>It suppose to be in this asset "Blok 1"
[09:00:30]<mstenta[m]>Click the checkbox next to all of your plant assets, and select the "Move" action from the dropdown
[09:00:46]<mstenta[m]>This will allow you to create a single movement log to assign their location to Block 1
[09:00:51]<mstenta[m]>s/Block/Blok/
[09:01:04]<mstenta[m]>Asset location is determined by movement logs
[09:01:19]<mstenta[m]>So in order for an asset to be "located" somewhere, it needs a log that "moves" it there
[09:04:12]<Ujeeee[m]>ACTION uploaded an image: (23KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/gJNSYwaujHV... >
[09:04:35]<Ujeeee[m]>ACTION uploaded an image: (31KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/xZAupWSwxmD... >
[09:04:40]<Ujeeee[m]>still nothing
[09:07:10]<mstenta[m]>Hmm if you click on one of your plant assets does it show the location as Blok 1?
[09:09:08]<Ujeeee[m]>Oh I think, it is because I check the "is fixed" box
[09:09:37]<mstenta[m]>Oh yes
[09:13:55]<mstenta[m]>This might also help: https://farmos.org/model/logic/location
[12:44:17]* farmBOT has joined #farmos
[12:56:32]* explore has quit (Quit: Connection closed for inactivity)
[13:36:10]<mstenta[m]>> I wonder if we could hack the breakpoint to make them horizontal tabs on mobile?
[13:36:10]<mstenta[m]>paul121 I'm poking around a bit with this to see what our options are...
[13:36:53]<mstenta[m]>I also asked in the #gin room on Slack and Sascha pointed out that this is actually a Claro issue, Gin inherits it
[13:37:12]<mstenta[m]>I found this core issue, although not much to it: https://www.drupal.org/project/drupal/issues/3280361
[17:18:34]<paul121[m]><mstenta[m]> "> I wonder if we could hack..." <- > <@mstenta:matrix.org> > I wonder if we could hack the breakpoint to make them horizontal tabs on mobile?
[17:18:35]<paul121[m]>>
[17:18:35]<paul121[m]>> paul121 I'm poking around a bit with this to see what our options are...
[17:18:35]<paul121[m]>I found the two template files `menu-local-tasks` and `menu-local-task` and was able to hack a secondary dropdown together.. really not too bad
[17:19:17]<paul121[m]>The CSS and JS is pretty confusing to me too but this helps makes the secondary behave like the primary
[17:19:49]<paul121[m]>ACTION uploaded an image: (46KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/pFJUTrXfZqx... >
[17:19:49]<paul121[m]>ACTION uploaded an image: (50KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/sPrAmteMxOX... >
[17:31:57]<mstenta[m]>Hey not bad!
[17:32:33]<mstenta[m]>> The CSS and JS is pretty confusing to me
[17:32:33]<mstenta[m]>Haha yea! I gave up 😅
[17:33:21]<paul121[m]>added to the PR
[19:48:57]* explore has joined #farmos