Commit Graph

288 Commits

Author SHA1 Message Date
Paul Weidner f17c1c448a Rename Average Weight graph 2019-09-25 11:05:05 -04:00
Paul Weidner ced00f371f Display graphs of average animal weights in group reports 2019-09-25 11:05:05 -04:00
Paul Weidner 875c46bbc6 Update group report, display HTML table and CSV Export 2019-09-25 11:05:05 -04:00
Paul Weidner 8bc35866bb Update name of individual report method. 2019-09-25 11:05:05 -04:00
Michael Stenta e99011881c Move individual weight report access callback to main module file. 2019-09-25 11:05:05 -04:00
Paul Weidner 76ace07782 Improve header formatting of CSV 2019-09-25 11:05:05 -04:00
Paul Weidner 229630bf5a Change to use a while loop to walk through columns + logs 2019-09-25 11:05:05 -04:00
Paul Weidner 655daacec1 Collect log dates unique to each animal 2019-09-25 11:05:05 -04:00
Paul Weidner a49c727a56 Unset the default start date, change the date_year_range to -10:+1 2019-09-25 11:05:05 -04:00
Paul Weidner 37dacdb43e Change CSV format to one animal per line, columns specific to date 2019-09-25 11:05:05 -04:00
Michael Stenta d453bad45f Remove asset ID and make "Current weight" bold. 2019-09-25 11:05:05 -04:00
Michael Stenta 6ad3ac254d Float graph to the right of the weights table. 2019-09-25 11:05:05 -04:00
Michael Stenta 1f1f8105a4 Allow creating a report of groups that contain other asset types in addition to animals (but skip them). 2019-09-25 11:05:05 -04:00
Michael Stenta 5e0c4e7507 Fix farm_livestock_weight_report_access(). 2019-09-25 11:05:05 -04:00
Michael Stenta c44662ed6c Install the Farm Report module (dependency of Livestock Weight Report). 2019-09-25 11:05:05 -04:00
Michael Stenta c9a21f92e2 Add a default "Info" tab to /farm/reports. Make weight report a local task. 2019-09-25 11:05:05 -04:00
Michael Stenta a731896a5e Pass $end_date into farm_quantity_log_asset() as the timestamp upper bound. 2019-09-25 11:05:05 -04:00
Michael Stenta a1e802b8f8 Do not include parameter variables in function call. 2019-09-25 11:05:05 -04:00
Michael Stenta 0a34e87a6d Simplify start/end date default value code. 2019-09-25 11:05:05 -04:00
Michael Stenta f629d8d9fd Misc whitespace, comments, Drupal coding standards fixes. 2019-09-25 11:05:05 -04:00
Paul Weidner f29b18742e Save weights for graph 2019-09-25 11:05:05 -04:00
Paul Weidner d7c5c9fe33 Prevent Weight tab from appearing on non-animal assets 2019-09-25 11:05:05 -04:00
Paul Weidner e64090e04f Change the name of animal weight graph page from 'report' to 'weight' 2019-09-25 11:05:05 -04:00
Paul Weidner 8e72ca9d45 Update the name of the JS graph behavior 2019-09-25 11:05:05 -04:00
Paul Weidner ed7d893842 Use the drupal theme function to render table of recorded weights 2019-09-25 11:05:05 -04:00
Paul Weidner ae7f8df22c Add start and end date filter to CSV export 2019-09-25 11:05:05 -04:00
Paul Weidner d4276befcf Export CSV file of weights from all animals of selected group(s) 2019-09-25 11:05:05 -04:00
Paul Weidner f2fc551b54 Remove the group ID from Select list 2019-09-25 11:05:05 -04:00
Paul Weidner 366332c4ba Add a form for selecting groups of animal assets 2019-09-25 11:05:05 -04:00
Paul Weidner 6b32df38a6 Add a Weight graph to the Livestock Report tab 2019-09-25 11:05:05 -04:00
Paul Weidner 9ade46dc83 Only display the table of weights if weights have been logged 2019-09-25 11:05:05 -04:00
Paul Weidner 4df8640b60 Move the report view to farm_livestock_report.inc 2019-09-25 11:05:05 -04:00
Paul Weidner 3d0789c0df Display all recorded weights in the Animal Reports tab 2019-09-25 11:05:05 -04:00
Paul Weidner 91f938e106 Add simple animal report view, show ID and current weight 2019-09-25 11:05:05 -04:00
Paul Weidner bbf9a7776f Add link to animal report 2019-09-25 11:05:05 -04:00
Michael Stenta 766454b0b7 Split animal weight code to farm_livestock_weight. 2019-07-09 14:04:42 -04:00
Michael Stenta 5c89340268 Adjust field group weights for consistency. 2019-04-11 00:00:39 -04:00
Michael Stenta 5fab821aa3 Add timestamp to log name patterns. 2019-04-09 14:38:55 -04:00
Michael Stenta 130b9301a5 Add metrics for total number of areas, and total area of certain area types. 2019-04-01 15:56:17 -04:00
Michael Stenta 3f17afcf63 Implement hook_restws_field_collection_info() for field collections: Group Memberships, Inventory Adjustments, Animal Tag IDs, Movements, and Quantity Measurements. 2019-03-06 17:35:11 -05:00
Michael Stenta e7a781a714 Move default livestock area types to new farm_livestock_area_types module. 2018-12-04 15:19:43 -05:00
Michael Stenta 4f9fbf6a06 Move Birth and Milk quick forms to separate include files (requires menu rebuild). 2018-11-30 11:51:08 -05:00
Michael Stenta e9b408119e Link milk logs to the quick form that created them. 2018-10-01 16:27:43 -04:00
Michael Stenta a3f77ec8a7 Wrap farm_quick_entity_link() calls in function_exists() condition. 2018-10-01 15:03:52 -04:00
Michael Stenta a798e64cd0 Use new farm_term() function where possible. 2018-10-01 14:49:24 -04:00
Michael Stenta 0c9038218e Remove #format parameter from submit field. 2018-09-05 12:59:25 -04:00
Michael Stenta 9895a39d89 Link birth quick form to assets and logs created by it. 2018-09-05 12:59:11 -04:00
Michael Stenta c1fb41daea Add KML button to all Views that need it. 2018-05-30 16:36:14 -04:00
Michael Stenta 6961cd4786 Add "Clone" button to all asset Views. 2018-05-23 12:33:16 -04:00
Michael Stenta 9929e12cb3 Add exposed "Areas" filter to all log Views. 2018-04-25 11:54:11 -04:00
Michael Stenta 698efdf0dc Remove default value from birth log category field. 2018-04-24 10:51:55 -04:00
Michael Stenta 79caad7665 Issue #2964907: Ajax error when recording birth 2018-04-24 08:03:25 -04:00
Michael Stenta c516f917b6 Add a simple bulk action for adding a log to a set of assets. 2018-04-23 17:49:46 -04:00
Michael Stenta 6b94592e87 Improve auto-generated log names for group membership, inventory, weight, and location. 2018-04-23 16:34:31 -04:00
Michael Stenta 1d8069b3bc Add the children to $form_state['storage'] so that other submit functions can work with them. 2018-04-23 11:05:33 -04:00
Michael Stenta f4be7e44a5 Add weights to child fields. 2018-04-23 11:05:20 -04:00
Michael Stenta e4ec1c47e0 Link animal's birthdate field to their birth log. 2018-04-23 10:17:36 -04:00
Michael Stenta 6d6840a063 Fix birth log message URLs. 2018-04-23 10:00:07 -04:00
Michael Stenta b049a83363 Validate that a child asset only has one birth log. 2018-04-23 10:00:01 -04:00
Michael Stenta 627fce2249 Add a shortcut link to the birth quick form when adding a new birth log. 2018-04-23 09:31:26 -04:00
Michael Stenta 4b716cb268 Improve mother/father field help text. 2018-04-23 09:22:23 -04:00
Michael Stenta a85ea349de Allow child name to be left blank if tag ID is set. 2018-04-23 09:19:08 -04:00
Michael Stenta 82855a881e Add fields for setting child animal weight in the birth form. 2018-04-23 09:18:46 -04:00
Michael Stenta 21c3c6a657 Issue #2958831: Update animal weights in bulk 2018-04-17 15:34:58 -04:00
Michael Stenta e97705060c Fix weight of "Individual" fieldset in animals. 2018-04-17 15:34:44 -04:00
Michael Stenta 226bf3f393 Validate animal weight field as a number. 2018-04-17 15:16:33 -04:00
Michael Stenta 52ef2cc038 Fix docblock type declaration. 2018-04-17 15:16:17 -04:00
Michael Stenta 00749f7a80 Use new helper function in the birth and milk quick forms. 2018-04-17 14:55:07 -04:00
Michael Stenta ed4df61ebc Allow farm_livestock_weight_set() to accept multiple assets. 2018-04-17 14:06:08 -04:00
Michael Stenta 2b3419ec6f Use new helper function in farm_livestock_weight_set(). 2018-04-17 13:59:58 -04:00
Michael Stenta f9b85b8137 Add "Flag" bulk action button to area, asset, and log Views. 2018-04-17 09:30:56 -04:00
Michael Stenta 93cb3eb2f0 Add ability to sort animals by date of birth. 2018-04-16 14:03:49 -04:00
Michael Stenta 7624449ce6 Sort animals list by name ascending. 2018-04-16 14:03:40 -04:00
Michael Stenta 1f78378885 Fix default field weights in assets so that "Name" appears on top (again). 2018-04-16 13:48:58 -04:00
Michael Stenta e1adae3dda Issue #2907879: Add row counter to asset/log lists 2018-04-16 13:48:41 -04:00
Michael Stenta 1a3ca112f6 Add exposed "Items per page" option to all Views. 2018-04-16 13:46:53 -04:00
drupalgin 0e5a226627 Issue #2950316 by drupalgin: Fixed coding standards 2018-04-07 12:40:16 -04:00
Michael Stenta e7e808de70 Add exposed Group filter to all asset views. 2018-04-05 10:15:38 -04:00
Michael Stenta d6df0078ad Add new log owner exposed filters. 2018-04-04 14:57:51 -04:00
Michael Stenta 5e4983062d Remove log owner filter, sort, and relationship that are causing duplicate rows. 2018-04-04 14:57:51 -04:00
Michael Stenta 53701c873e Fix log field weights so that name and timestamp are on top (again). 2018-03-27 15:48:18 -04:00
Michael Stenta 2f9cb9ba02 Minor: add missing Views translatable. 2018-03-22 18:41:31 -04:00
Michael Stenta 96539b8804 Issue #2954290 by m.stenta, Permakai: Duplicate asset rows when an asset is in multiple groups 2018-03-22 18:39:58 -04:00
Michael Stenta c1b83f12de Add a quick form for recording milk harvests. 2018-03-21 14:47:35 -04:00
Michael Stenta 2aa4e58123 Move quantity log query functions into a new module to fix hidden circular dependency between farm_area and farm_quantity. 2018-03-21 11:45:32 -04:00
Michael Stenta cfb9171a77 Change 'tab' to 'label' in quick form definitions. 2018-03-21 09:45:14 -04:00
Michael Stenta 8ee64a55c3 Add exposed sort for asset ID and log ID on all asset and log Views. 2018-03-19 17:02:19 -04:00
Michael Stenta 0bfc8ff143 Add Flags field and filter to all asset and log Views. 2018-03-19 17:02:19 -04:00
Michael Stenta 50e82d0c68 Add Flags field to all asset and log types. 2018-03-19 17:02:19 -04:00
Michael Stenta 97859d90ff Move exposed filter for animal location down in the list. 2018-03-19 12:12:10 -04:00
Michael Stenta 9df1ccc9de Add exposed date range filter for date of birth in animals list. 2018-03-19 12:11:29 -04:00
Michael Stenta 3f09964cb5 Provide a quick form for recording animal births. 2018-03-02 14:34:19 -05:00
Michael Stenta c0bf169207 When a birth log is saved, sync the date of birth and mother reference to the children assets. 2018-03-02 12:20:43 -05:00
Michael Stenta 3edaa183de Show birth logs on mother assets. 2018-03-02 12:20:43 -05:00
Michael Stenta 065d14a0d3 In birth log forms, farm_asset query parameter should populate field_farm_mother, not field_farm_asset. 2018-03-02 12:20:43 -05:00
Michael Stenta a0e93dac4e Add/alter feeds field mappings on birth logs. 2018-03-02 12:20:43 -05:00
Michael Stenta fadfb29a1c Prepopulate birth logs with the "Animals" category. 2018-03-02 12:20:43 -05:00
Michael Stenta 2c439c8184 Add UI entity support for birth logs. 2018-03-02 12:20:43 -05:00
Michael Stenta a1eef3e309 Add a View of Birth logs. 2018-03-02 12:20:43 -05:00
Michael Stenta 1a1c4de007 Add "Mother" asset reference field to Birth logs. 2018-03-02 12:20:43 -05:00
Michael Stenta e38a4ebaf9 Add new "Birth" log type to the Livestock module. 2018-03-02 12:20:43 -05:00
Michael Stenta 364c4990c4 Add "Archive" and "Unarchive" VBO buttons to all asset Views. 2018-02-26 22:18:53 -05:00
Michael Stenta 09fed34247 Reorganize log field groups into "Assets" and "Location". 2018-02-21 16:32:02 -05:00
Michael Stenta ca0ad53caf Update all Views to use new 'archived' field/filter/sort. 2018-01-31 09:36:51 -05:00
Michael Stenta b6722da8fb Fix asset field weights so that name is always at top. 2017-12-30 16:50:50 -05:00
Michael Stenta 13f70c6aee Add dependencies on farm_asset_views. 2017-12-30 16:39:07 -05:00
Michael Stenta 52af43b8a7 Add Group filter to all asset Views. 2017-12-30 13:13:51 -05:00
Michael Stenta cd8965a577 Fix log field weights so that timestamp is always at top under name. 2017-12-29 17:00:16 -05:00
Michael Stenta 09f0031900 Use new boolean_default tamper plugin for all boolean import columns. 2017-12-29 16:05:20 -05:00
Michael Stenta 64bdb4701d More misc Views updates (remove old translations). 2017-12-28 11:12:05 -05:00
Michael Stenta e385792096 Remove secondary log ID sorts (this is done automatically in Log module now). 2017-12-28 11:10:11 -05:00
Michael Stenta 5d2dd3c17e Misc Views export updates. 2017-12-27 17:37:38 -05:00
Michael Stenta c3a6c9c556 Change "Name/Search" column to "Log name" and add exposed "Log name" and "Log type" filters and sorts to log Views. 2017-12-27 17:34:43 -05:00
Michael Stenta 97350bb708 Fix argument type in docblock. 2017-12-16 10:42:27 -05:00
Michael Stenta c0c577232b Add dependencies on field_group_easy_responsive_tabs module. 2017-12-05 12:31:47 -05:00
Michael Stenta a334b27a51 Fix animal group migration to work with membership field collections. 2017-11-24 23:07:10 -05:00
Michael Stenta ae9ca7d069 Add views-tree CSS class to Views that use a tree display. 2017-11-24 21:07:47 -05:00
Michael Stenta 6a0a5bc2ab Add bulk delete operation to asset, log, and area Views. 2017-11-24 21:07:47 -05:00
Michael Stenta dc8e0dd7c9 Return the logs created by helper functions (movements, group, inventory, weight). 2017-11-24 21:00:10 -05:00
Michael Stenta 08209a5b0e Add a special Weight field to animal asset forms for setting their current weight. 2017-11-24 20:59:34 -05:00
Michael Stenta 0b7fdc78ad Add a function for creating a weight measurement log associated with an animal. 2017-11-24 20:59:34 -05:00
Michael Stenta 27b07719cb Display an animal's current weight when viewing the animal record. 2017-11-24 20:59:34 -05:00
Michael Stenta 2b38b944d8 Add a function for getting an animal's current weight. 2017-11-24 20:59:34 -05:00
Michael Stenta cdf5f7672e Convert group reference to a Field Collection in Activity and Observation logs. 2017-11-24 20:58:33 -05:00
Michael Stenta 638589a3c1 Add "Group" VBO action button to all asset Views. 2017-11-24 20:58:33 -05:00
Michael Stenta dab82ea3f1 Migrate group terms to assets and egg logs to harvest logs. 2017-11-24 20:58:33 -05:00
Michael Stenta 8ecda9d08f Remove old animal group column. 2017-11-24 20:58:33 -05:00
Michael Stenta 35b7a77915 Add Group column to all asset Views. 2017-11-24 20:58:33 -05:00
Michael Stenta b0f8ceb439 Move areas, movement, and inventory field displays relative to assets, and other field display consistency fixes. 2017-11-24 20:58:33 -05:00
Michael Stenta 181e157b78 Remove feeds tamper that makes animal sex field required. 2017-11-14 13:44:22 -05:00
Michael Stenta 515f2cb27e Improvements to asset form help text to support non-individual animals. 2017-11-14 13:44:22 -05:00
Michael Stenta c79cc63c59 Move Animal birthdate, sex, castrated, and nickname fields to new Individual fieldset. Make sex field optional. 2017-11-14 13:44:22 -05:00
Michael Stenta cc534563ad Add inventory column to Animals list. 2017-11-14 13:44:22 -05:00
Michael Stenta e340995f64 Enable inventory tracking for animal assets, and treat them as individuals by default. 2017-11-14 13:44:22 -05:00
Michael Stenta f9dc1a65c0 Add Inventory field collection to log types: Input, Activity, Harvest, Seeding, Transplanting, Medical, Observation, Sale, Maintenance. 2017-11-14 13:43:11 -05:00
Michael Stenta 7dc626a450 Issue #2915011: Move farm_log_movement to farm_movement 2017-10-10 18:07:50 -04:00
Michael Stenta 01f95f3058 Fix farm_log dependencies. Stop using it to automatically install activity, harvest, input, and observation modules. 2017-10-10 17:59:32 -04:00
Michael Stenta 66b88adb3b Reorganize all asset and log fields into Easy Responsive Tabs. 2017-09-26 13:30:08 -04:00
Michael Stenta cb2e8716e3 Change "Owner" to "Assigned to" in log field instances and views. 2017-09-04 11:51:19 -04:00
Michael Stenta 82d29d81dd Issue #2906277: Can't enter new animal birth dates before 2014 2017-09-01 21:06:52 -04:00
Michael Stenta 28c00de93e Misc log Views update: add skip_permission_check setting. 2017-08-30 09:18:06 -04:00
Michael Stenta 73d2d276ad Misc log Views update: make rows clickable. 2017-08-30 09:17:40 -04:00
Michael Stenta 705e370065 Add "Assign" button to all log Views. 2017-08-30 09:16:01 -04:00
Michael Stenta 22094d799a Fix "Owner" field in Views so that it shows multiple owners. 2017-08-30 09:11:32 -04:00
Michael Stenta ddaa96921e Change animal birthdate field widget to select. 2017-08-06 13:52:23 -04:00
Michael Stenta 8d121ad75e Autopopulate categories on certain log types. 2017-08-06 13:52:23 -04:00
Michael Stenta 5208f4b5bf Misc Views updates: rearranging fields for importer consistency, updating export code, etc. 2017-08-06 13:51:02 -04:00
Michael Stenta 175dca99ac Add Description and Active fields to all asset Views. 2017-08-06 13:51:01 -04:00
Michael Stenta 02de0315b4 Add Notes field to all Log Views. 2017-08-06 13:51:01 -04:00
Michael Stenta c9be834848 Change "Category" to "Categories" in Views for consistency with Feeds importers. 2017-08-06 13:51:01 -04:00