| [13:20:59] | * botlfarm[m] has joined #farmos |
| [13:20:59] | <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? |
| [14:23:24] | <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... |
| [14:24:27] | <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". |
| [14:25:33] | <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". |
| [14:27:42] | <symbioquine[m]> | symbioquine[m]: Oh yeah, we also have "birthdate" for animals that might be populated so that is probably the way to go. |
| [14:30:13] | <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. |
| [15:02:01] | <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. |
| [15:06:14] | <symbioquine[m]> | Ah, actually it occurs to me you could also maybe do it by hand with an api query too... |
| [15:07:13] | <symbioquine[m]> | Are the birthdates and archived dates accurate? |
| [15:17:18] | <symbioquine[m]> | You would basically query for "dob > day_in_question AND (archived_date > day_in_question OR archived_date = nil)" |
| [15:18:23] | <symbioquine[m]> | I think day_in_question would be a numeric unix epoch timestamp. |