| 18:20 | * | botlfarm[m] has joined |
| 18:20 | botlfarm[m] | I know this was discussed somewhere before but cant find it in the forum. Anyone know how to generate a report of livestock count by species on a particular day in the past? |
| 19:23 | symbioquine[m] | There's a bit of requirements definition needed since farmOS doesn't have super clear "lifecycle" tracking for animals, we have to make some assumptions... |
| 19:24 | symbioquine[m] | e.g. we could either look for a birth log as the date the animal "started being on the farm" or absent that we could use the "created date". |
| 19:25 | symbioquine[m] | Similarly, there isn't a concept of a general concept of a "death/sale" log (yet I think - though we have discussed "termination logs" in the past) so the best option is probably using the "archived date". |
| 19:27 | symbioquine[m] | symbioquine[m]: Oh yeah, we also have "birthdate" for animals that might be populated so that is probably the way to go. |
| 19:30 | symbioquine[m] | The created/birth/archive dates are available as columns in the csv export so one option would be to do your report based on that. |
| 20:02 | botlfarm[m] | thanks symbioquine I think my best bet is to export out animals with birthdates and archived or terminated dates and manually filter from there. |
| 20:06 | symbioquine[m] | Ah, actually it occurs to me you could also maybe do it by hand with an api query too... |
| 20:07 | symbioquine[m] | Are the birthdates and archived dates accurate? |
| 20:17 | symbioquine[m] | You would basically query for "dob > day_in_question AND (archived_date > day_in_question OR archived_date = nil)" |
| 20:18 | symbioquine[m] | I think day_in_question would be a numeric unix epoch timestamp. |