{"action":"created","issue":{"url":"https://api.github.com/repos/concrete5/concrete5/issues/7329","repository_url":"https://api.github.com/repos/concrete5/concrete5","labels_url":"https://api.github.com/repos/concrete5/concrete5/issues/7329/labels{/name}","comments_url":"https://api.github.com/repos/concrete5/concrete5/issues/7329/comments","events_url":"https://api.github.com/repos/concrete5/concrete5/issues/7329/events","html_url":"https://github.com/concrete5/concrete5/issues/7329","id":382925784,"node_id":"MDU6SXNzdWUzODI5MjU3ODQ=","number":7329,"title":"[Express Associations] Allow selection of specific attribute(s) when making/editing associations (and/or forms)","user":{"login":"BloodyIron","id":12439391,"node_id":"MDQ6VXNlcjEyNDM5Mzkx","avatar_url":"https://avatars3.githubusercontent.com/u/12439391?v=4","gravatar_id":"","url":"https://api.github.com/users/BloodyIron","html_url":"https://github.com/BloodyIron","followers_url":"https://api.github.com/users/BloodyIron/followers","following_url":"https://api.github.com/users/BloodyIron/following{/other_user}","gists_url":"https://api.github.com/users/BloodyIron/gists{/gist_id}","starred_url":"https://api.github.com/users/BloodyIron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloodyIron/subscriptions","organizations_url":"https://api.github.com/users/BloodyIron/orgs","repos_url":"https://api.github.com/users/BloodyIron/repos","events_url":"https://api.github.com/users/BloodyIron/events{/privacy}","received_events_url":"https://api.github.com/users/BloodyIron/received_events","type":"User","site_admin":false},"labels":[{"id":302795110,"node_id":"MDU6TGFiZWwzMDI3OTUxMTA=","url":"https://api.github.com/repos/concrete5/concrete5/labels/type:discussion","name":"type:discussion","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-21T02:13:35Z","updated_at":"2018-12-30T01:45:02Z","closed_at":null,"author_association":"NONE","body":"I'm using one of the recent dev builds, namely so I can test the User Attribute type, and I can get more specific if you need me to, but I think this is something that is probably relevant to current release anyways.\r\n\r\nI'm testing the finer points of how Express Associations work, and I think I found something that's worth improving.\r\n\r\nWhen I have two Express Objects, one for Teams, and one for Players, this is what I do in testing.\r\n\r\n1. Teams has two Text Attributes, \"Team Name\" and \"Team Captain\"\r\n2. Players has a User Attribute, and the association attribute in the form (so you can choose what team they want to join)\r\n3. There is a Many to One association setup ( Players > Teams ), aka, Many players, One team.\r\n\r\nOn Teams, \"Team Name\" is the first Attribute made. When I edit a Player entity, I can see the \"Team Name\" attribute for \"Teams\" entities, and I can set a player to a team.\r\n\r\nHOWEVER, If i delete the \"Team Name\" Attribute, the association now defaults to the \"Team Captain\" attribute as what is presented in the Association selection options when modifying a \"Players\" entity.\r\n\r\nI think we should be able to define what attributes are used in associations in different ways.\r\n\r\n1. We make it so when you add an Association type to a Form, that you can specify what \"Attribute\" of the other Express Entity is shown (Team Names? Team Captains?)\r\n2. We make it so when you make/edit the Association itself, you can define which attribute(s) are used, and how\r\n\r\nI think #1 is more versatile since you can have the two associations do all kinds of neat things, and I'm not even sure of the full ramifications of it. But #2 might have some good scenarios too I'm not accounting for.\r\n\r\nNow, there is one GLARING problem I'm seeing with the current way this works. If I _ACCIDENTALLY_ deleted that \"Team Name\" attribute, I don't have an easy way to re-create it, and have the association point to it again. It appears to use the next in like of attributes, and not have a way to change that.\r\n\r\nSo this is both a bug, and feature request, in one! Yay! And I think this could be really awesome!"},"comment":{"url":"https://api.github.com/repos/concrete5/concrete5/issues/comments/450533498","html_url":"https://github.com/concrete5/concrete5/issues/7329#issuecomment-450533498","issue_url":"https://api.github.com/repos/concrete5/concrete5/issues/7329","id":450533498,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUzMzQ5OA==","user":{"login":"BloodyIron","id":12439391,"node_id":"MDQ6VXNlcjEyNDM5Mzkx","avatar_url":"https://avatars3.githubusercontent.com/u/12439391?v=4","gravatar_id":"","url":"https://api.github.com/users/BloodyIron","html_url":"https://github.com/BloodyIron","followers_url":"https://api.github.com/users/BloodyIron/followers","following_url":"https://api.github.com/users/BloodyIron/following{/other_user}","gists_url":"https://api.github.com/users/BloodyIron/gists{/gist_id}","starred_url":"https://api.github.com/users/BloodyIron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloodyIron/subscriptions","organizations_url":"https://api.github.com/users/BloodyIron/orgs","repos_url":"https://api.github.com/users/BloodyIron/repos","events_url":"https://api.github.com/users/BloodyIron/events{/privacy}","received_events_url":"https://api.github.com/users/BloodyIron/received_events","type":"User","site_admin":false},"created_at":"2018-12-30T01:45:02Z","updated_at":"2018-12-30T01:45:02Z","author_association":"NONE","body":"I've been mulling this one over since the above posts, and I really think this will eventually need to be implemented. And I don't just mean for what I want to do, I mean if people want to rely on Express to do all sorts of things, this kind of a feature is going to be necessary to correct for mistakes, and also granularly control relationships.\r\n\r\nSo, while this is still marked as discussion (which it seems nobody is discussing it apart from me), I'd like it if this could be considered for the pipeline."}}
{"actor":{"display_login":"BloodyIron"}}