* Fix Bug in User::generateFormattedNameFromFullName
In a name "John Doe", this method would split it into "John" and " Doe",
Leaving a space in the last name when importing to the database. Strip
this space.
* Cleanup/fix some item mapping.
Also make some changes to the importer schema to allow for unit testing.
Generate a default item mapping, and then merge that with any custom
mappings.
* Beginning work on importer unit tests.
* Strip out testrun branches from importer. It added a lot of complexity and was not terribly useful with web importer as it stood, might reconsider down the road however.
* Normalize the mapped keys when using custom field mappings.
* Add test for custom asset import mapping.
* Make all unit tests inherit from a new custom base.
This baseclass currently calls Artisan::migrate() and seeds a Settings
instance. This fixes unit tests after the autoincrement bits.
* Store requestable as a boolean. Fixes some import oddities
* Work on tests for accessory importer.
* Test for custom mapping of accessory import, also adjust the internal field for purchase date.
* Update default locale fallback for currency detection
* Fix Reassignable in consumable as well.
* More importer tests and fixes.
* Major code simplification of the importers.
Move towards using Model::fill and Model::update rather than reinventing
the wheel. This makes the updating/creating logic a lot clearer, and
allows for the deletion of a lot of code. Also allows for supporting of
more fields in the future really easily.
* Cleanup constructors and use setters instead.
* Set the LC_MONETARY locale, and use it to strip currency symbols in Helper::parseFloat()
* Move licenseseat creation/deletion logic into an event handler on the model rather than the controller.
* Move the logging of parsed values to array_smart_fetch rather than writing it out everywhere
* Move to storing dates as carbon rather than strings. Allows for the parsing of more arbitrary strings from the importer
* Add a license importer with support for checking out to users or assets.
* Make a directory for sample/mock import csvs and populate it
* Adjust how we store/retrieve dates to fix some issues the tests found.
* Add presenters for models. Move bootstrap table JSON generation to these presenters, which cleans up controllers a lot. Move view specific modifications from the models to the presenters as well.
* Fix some issues found by travis and codacy
* Fix a few more issues found while testing.
* Attempt another acceptance test fix
* Try something else
* Maybe..
* Consolidate edit form elements into reusable partials.
This is a large code change that doesn't do much immediately. It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.
In addition, I've gone ahead and renamed a few database fields. We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number. We had items using ::note and ::notes, I've standardized
on ::notes. Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.
TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.
Rename assetmodel::modelno to model_number for clarity and consistency
Rename consumable::model_no to model_number for clarity and consistency
Rename assetmodel::note to notes for clarity and consistency
Port asset and assetmodel to new partials layout. Adapt all code to the renamed model_number and notes database changes. Fix some stying.
* Share a settings variable with all views.
* Allow editing the per_page setting. We showed the value, but we never showed it on the edit page..
* use snipeSettings in all views instead of the long ugly path.
* War on partials. Centralize all bootstrap table javascript
* Use model_number instead of modelno in importer
* Codacy fix.
* More unification/deduplication. Create an edit form template layout that we use as the base for all edit forms. This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.
* Use a ViewComposer instead of sharing the variable directly. Fixes artisan optimize trying to hit the db--which ruins new installs
* Fix DB seeder.
* Base sql dump and csv's to import data from for tests.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* A few things to make acceptance tests work. Add a name to the companies table, and make the locations table have the correct name
* Use a .env.tests file for testing functional and unit to allow a separate database.
* Add functional tests for compoents, groups, and licenses.
* Now that the config is in the functional.yml, this just confuses things.
* Start some functional tests for creating items.
* Add functional tests for all create methods. Still need to do tests for edits, deletes, and lots of other things
* Improvements to functional tests.
Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.
* Some improvements to acceptance tests.
Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.
I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.
* update db dump
* Update tests to new reality
* env for the test setup
* only load the database at beginning of tests, not between each Functional test.
* Fix a miss from renaming note to notes.
* Set Termination date when creating an asset. It was only set on edit.
* Rename serial_number to serial in components for consistency.
* Update validation rules to match limits in database. Currently we just accepted the values and they were truncated when adding to DB.
* Much more detailed functional testing of creating items. This checks to make sure all values on form have been successfully persisted to database.
* Save progress
* Create a new action_log table to replace asset_log. Use Polymorphism to generalize class and targets. Port everything I can find to use it. Add a migration to port the asset_logs table to action_logs.
* Allow accepted_id to be nullable.
* Comment out the thread_id migration, because it b0rks on a new database with the move. I'm unsure if the thread_id does anything...It doesn't seem to be used
* Clean up all old methods from Actionlog model. Port everything to use new cleaner interface.
* Port the actionlog factory to fix travis.
* Adjust code to work on php5. Also fix lurking adminlog call.
* Remove weird code
* Port the pave command. Also fix dangling adminlog