{"action":"created","issue":{"url":"https://api.github.com/repos/RNGR/directus6/issues/481","labels_url":"https://api.github.com/repos/RNGR/directus6/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/RNGR/directus6/issues/481/comments","events_url":"https://api.github.com/repos/RNGR/directus6/issues/481/events","html_url":"https://github.com/RNGR/directus6/issues/481","id":50690203,"number":481,"title":"Adding a new relational column doesn't insert all needed parameters","user":{"login":"benhaynes","id":522079,"avatar_url":"https://avatars.githubusercontent.com/u/522079?v=3","gravatar_id":"","url":"https://api.github.com/users/benhaynes","html_url":"https://github.com/benhaynes","followers_url":"https://api.github.com/users/benhaynes/followers","following_url":"https://api.github.com/users/benhaynes/following{/other_user}","gists_url":"https://api.github.com/users/benhaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/benhaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhaynes/subscriptions","organizations_url":"https://api.github.com/users/benhaynes/orgs","repos_url":"https://api.github.com/users/benhaynes/repos","events_url":"https://api.github.com/users/benhaynes/events{/privacy}","received_events_url":"https://api.github.com/users/benhaynes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RNGR/directus6/labels/major","name":"major","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"WellingGuzman","id":1531291,"avatar_url":"https://avatars.githubusercontent.com/u/1531291?v=3","gravatar_id":"","url":"https://api.github.com/users/WellingGuzman","html_url":"https://github.com/WellingGuzman","followers_url":"https://api.github.com/users/WellingGuzman/followers","following_url":"https://api.github.com/users/WellingGuzman/following{/other_user}","gists_url":"https://api.github.com/users/WellingGuzman/gists{/gist_id}","starred_url":"https://api.github.com/users/WellingGuzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WellingGuzman/subscriptions","organizations_url":"https://api.github.com/users/WellingGuzman/orgs","repos_url":"https://api.github.com/users/WellingGuzman/repos","events_url":"https://api.github.com/users/WellingGuzman/events{/privacy}","received_events_url":"https://api.github.com/users/WellingGuzman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RNGR/directus6/milestones/1","labels_url":"https://api.github.com/repos/RNGR/directus6/milestones/1/labels","id":228948,"number":1,"title":"6.0","description":"Unannounced public release","creator":{"login":"RNGR","id":1563261,"avatar_url":"https://avatars.githubusercontent.com/u/1563261?v=3","gravatar_id":"","url":"https://api.github.com/users/RNGR","html_url":"https://github.com/RNGR","followers_url":"https://api.github.com/users/RNGR/followers","following_url":"https://api.github.com/users/RNGR/following{/other_user}","gists_url":"https://api.github.com/users/RNGR/gists{/gist_id}","starred_url":"https://api.github.com/users/RNGR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RNGR/subscriptions","organizations_url":"https://api.github.com/users/RNGR/orgs","repos_url":"https://api.github.com/users/RNGR/repos","events_url":"https://api.github.com/users/RNGR/events{/privacy}","received_events_url":"https://api.github.com/users/RNGR/received_events","type":"Organization","site_admin":false},"open_issues":23,"closed_issues":382,"state":"open","created_at":"2012-12-13T01:31:51Z","updated_at":"2015-02-08T17:20:37Z","due_on":"2015-01-01T05:00:00Z","closed_at":null},"comments":2,"created_at":"2014-12-02T17:50:52Z","updated_at":"2015-02-10T20:13:38Z","closed_at":null,"body":"If you add a relational column to a table, some parameters are not saved. For example:\r\n\r\nAdding a *test_image* SINGLE_FILE UI under arts:\r\nhttp://directus.rngr.org/settings/tables/arts\r\n\r\nWorks, except its *directus_columns* record is missing the following:\r\n* **relationship_type** – should have \"MANYTOONE\"\r\n* **table_related** – should have \"directus_files\"\r\n* **junction_key_right** – should have \"test_image\"\r\n\r\nSince it is missing those values, the column does not get the relational icon/overlay (which now works) – so you have to add everything in the database directly.\r\n\r\nIt seems like the best way to handle this might be to have each UI file have variables for if it is relational, and any applicable defaults. For instance a SINGLE_FILE will always be MANYTOONE and should have a default related table of *directus_files*."},"comment":{"url":"https://api.github.com/repos/RNGR/directus6/issues/comments/73774706","html_url":"https://github.com/RNGR/directus6/issues/481#issuecomment-73774706","issue_url":"https://api.github.com/repos/RNGR/directus6/issues/481","id":73774706,"user":{"login":"benhaynes","id":522079,"avatar_url":"https://avatars.githubusercontent.com/u/522079?v=3","gravatar_id":"","url":"https://api.github.com/users/benhaynes","html_url":"https://github.com/benhaynes","followers_url":"https://api.github.com/users/benhaynes/followers","following_url":"https://api.github.com/users/benhaynes/following{/other_user}","gists_url":"https://api.github.com/users/benhaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/benhaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benhaynes/subscriptions","organizations_url":"https://api.github.com/users/benhaynes/orgs","repos_url":"https://api.github.com/users/benhaynes/repos","events_url":"https://api.github.com/users/benhaynes/events{/privacy}","received_events_url":"https://api.github.com/users/benhaynes/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T20:13:38Z","updated_at":"2015-02-10T20:13:38Z","body":"@WellingGuzman I'm getting an error trying to add a field (it adds the field but no record into \"directus_columns\"). I can add the field, but when I go to save the table settings I get:\r\n\r\n```\r\n<error>\r\nunderscore.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:768 <error>underscore.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:768 _.extendunderscore.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:813 _.cloneColumnModel.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:80 module.exports.Backbone.Model.extend.toJSONbackbone.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:1148 Backbone.syncmain.js:337 Backbone.syncbackbone.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:289 _.extend.syncbackbone.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:492 _.extend.saveTablesView.js?bust=921658263a6766b1d8d5fce6c6be45b28bab7381:617 SettingsTables.Views.Table.BasePageView.extend.saveColumnsjquery-1.11.0.js:4624 n.event.dispatchjquery-1.11.0.js:4292 r.handle\r\n```"}}