{"action":"created","issue":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/1397","labels_url":"https://api.github.com/repos/snipe/snipe-it/issues/1397/labels{/name}","comments_url":"https://api.github.com/repos/snipe/snipe-it/issues/1397/comments","events_url":"https://api.github.com/repos/snipe/snipe-it/issues/1397/events","html_url":"https://github.com/snipe/snipe-it/issues/1397","id":118964830,"number":1397,"title":"Improvements to custom asset fields","user":{"login":"snipe","id":197404,"avatar_url":"https://avatars.githubusercontent.com/u/197404?v=3","gravatar_id":"","url":"https://api.github.com/users/snipe","html_url":"https://github.com/snipe","followers_url":"https://api.github.com/users/snipe/followers","following_url":"https://api.github.com/users/snipe/following{/other_user}","gists_url":"https://api.github.com/users/snipe/gists{/gist_id}","starred_url":"https://api.github.com/users/snipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipe/subscriptions","organizations_url":"https://api.github.com/users/snipe/orgs","repos_url":"https://api.github.com/users/snipe/repos","events_url":"https://api.github.com/users/snipe/events{/privacy}","received_events_url":"https://api.github.com/users/snipe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snipe/snipe-it/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"snipe","id":197404,"avatar_url":"https://avatars.githubusercontent.com/u/197404?v=3","gravatar_id":"","url":"https://api.github.com/users/snipe","html_url":"https://github.com/snipe","followers_url":"https://api.github.com/users/snipe/followers","following_url":"https://api.github.com/users/snipe/following{/other_user}","gists_url":"https://api.github.com/users/snipe/gists{/gist_id}","starred_url":"https://api.github.com/users/snipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipe/subscriptions","organizations_url":"https://api.github.com/users/snipe/orgs","repos_url":"https://api.github.com/users/snipe/repos","events_url":"https://api.github.com/users/snipe/events{/privacy}","received_events_url":"https://api.github.com/users/snipe/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/snipe/snipe-it/milestones/7","html_url":"https://github.com/snipe/snipe-it/milestones/v2.1.0","labels_url":"https://api.github.com/repos/snipe/snipe-it/milestones/7/labels","id":1226449,"number":7,"title":"v2.1.0","description":"","creator":{"login":"snipe","id":197404,"avatar_url":"https://avatars.githubusercontent.com/u/197404?v=3","gravatar_id":"","url":"https://api.github.com/users/snipe","html_url":"https://github.com/snipe","followers_url":"https://api.github.com/users/snipe/followers","following_url":"https://api.github.com/users/snipe/following{/other_user}","gists_url":"https://api.github.com/users/snipe/gists{/gist_id}","starred_url":"https://api.github.com/users/snipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipe/subscriptions","organizations_url":"https://api.github.com/users/snipe/orgs","repos_url":"https://api.github.com/users/snipe/repos","events_url":"https://api.github.com/users/snipe/events{/privacy}","received_events_url":"https://api.github.com/users/snipe/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":46,"state":"open","created_at":"2015-07-26T19:37:56Z","updated_at":"2015-11-30T23:41:00Z","due_on":"2015-11-30T08:00:00Z","closed_at":null},"comments":2,"created_at":"2015-11-26T03:29:22Z","updated_at":"2015-12-01T01:13:26Z","closed_at":null,"body":"Hey @uberbrady - really nice work on that custom fields pull request! This is a long-awaited feature, and I'm so glad we're so close to being able to release it. \r\n\r\n![hagrid-yes](https://cloud.githubusercontent.com/assets/197404/11414454/44da7cd0-93aa-11e5-8eb7-376c7082f3ea.gif)\r\n\r\nThis ticket is just to help its keep track of the misc improvements that need to be handled before we can release. Please tick the checkboxes as you go, so we don't end up working on the same stuff. I'll be mostly focusing on improving the front-end for now, but may end up working on some of these other issues as well.\r\n\r\n- [x] Validation when creating a new field. I can currently submit the form with no name, which creates a field named `_snipeit_`. Currently not checking for a name value, but also not checking that the name that's entered is unique.\r\n- [x] Better error handling - Related to the above, if I try to add a blank custom field a second time, I don't get an error, but nothing happens. We should return intelligent error messages here. \r\n- [x] Ability to to delete custom fields/fieldsets. We can either ONLY allow it if there are no values in those columns, or let the admin delete it anyway, but make them double-confirm and warn the shit out of them.\r\n- [x] Confirm this section is accessible to super-admins ONLY\r\n- [ ] Localization - the text here needs to be pulled into language strings\r\n- [x] Make urls consistent with `admin/settings/foo`\r\n- [x] Also I think it will let you add the same field twice to a fieldset. That makes no sense; they're literally the same field. I don't think conventional validations will be able to catch this though - perhaps a way to do 'unique' in there somewhere? Or a custom validator? Or just validate it through the controller (blech).\r\n\r\n(more to come)"},"comment":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/comments/160814895","html_url":"https://github.com/snipe/snipe-it/issues/1397#issuecomment-160814895","issue_url":"https://api.github.com/repos/snipe/snipe-it/issues/1397","id":160814895,"user":{"login":"uberbrady","id":36335,"avatar_url":"https://avatars.githubusercontent.com/u/36335?v=3","gravatar_id":"","url":"https://api.github.com/users/uberbrady","html_url":"https://github.com/uberbrady","followers_url":"https://api.github.com/users/uberbrady/followers","following_url":"https://api.github.com/users/uberbrady/following{/other_user}","gists_url":"https://api.github.com/users/uberbrady/gists{/gist_id}","starred_url":"https://api.github.com/users/uberbrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberbrady/subscriptions","organizations_url":"https://api.github.com/users/uberbrady/orgs","repos_url":"https://api.github.com/users/uberbrady/repos","events_url":"https://api.github.com/users/uberbrady/events{/privacy}","received_events_url":"https://api.github.com/users/uberbrady/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T01:13:26Z","updated_at":"2015-12-01T01:13:26Z","body":"Did my checkboxes here, now handing off to @snipe for localization support."}}