Custom field format changed to regex:/^ANY$/ after 3.0 update
Expected Behavior (or desired behavior if a feature request)
(what you expect to happen goes here)
Actual Behavior
All the custom field formats created before the update with the value "ANY" are changed to regex:/^ANY$/ and now when we try to create assets with those custom fields it fails and says the format is incorrect.
Please confirm you have done the following before posting your bug report:
- [yes ] I have enabled debug mode
- [yes ] I have read checked the Common Issues page
Please provide answers to these questions before posting your bug report:
- Version of Snipe-IT you're running v3.0-ebc74a65
- What OS and web server you're running Snipe-IT on Windows Server 2012 with IIS 8
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Manual
- If you're getting an error in your browser, include that error.
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error At this page /hardware/create when saving a new asset
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console. Just one error on one font load, dont think its related.
- Confirm whether the error is reproduceable on the demo.
- Include any additional information you can find in
app/storage/logsand your webserver's logs. No error found on logs - Include what you've done so far in the installation, and if you got any error messages along the way. No errors during update
- Indicate whether or not you've manually edited any data directly in the database. Nothing edited.
This image is the error at trying to save a new asset.

The next image is from custom fields, the last one created in v3.0 the other ones created on v2.1

Thanks for the excellent bug report!
It looks like I must have missed it in the migration here:
https://github.com/snipe/snipe-it/blob/master/database/migrations/2016_03_22_125911_fix_custom_fields_regexes.php
Im glad it could help!
So now, how can i fix it, because right now we cant add new assets and we are migrating our old "asset control" stuff to Snipe IT.
Its anything i can do to fix it right now? like changing any database value or something like that?
Keep the good work, the tool is gorgeous!
Do you have access to the database directly? If you do, change the value of the weird regex ones to blank, and see if that helps. I'm working on fixing the issue now.
Also can you tell me if you did any migration rollbacks? I can reproduce this locally, but I rollback migrations constantly, so not sure if this would affect anyone who hasn't rolled back.
I have a fix out on the dev branch now - the migration I created should clean up the donked field values.
Sorry for the late answer, im at work right now and have little time to check this.
I didnt do any rollbacks.
Thanks for the fix!
You should try it before you thank me :P
So what should i do to apply the updates. Download from here the newest files, aply them to my server and do a "composer update" or something like that? I usually wait for new full downloads from your web.
run php artisan migrate, same as you would any time you upgrade.