{"action":"created","issue":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/2086","repository_url":"https://api.github.com/repos/opensourcepos/opensourcepos","labels_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/2086/labels{/name}","comments_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/2086/comments","events_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/2086/events","html_url":"https://github.com/opensourcepos/opensourcepos/pull/2086","id":351416389,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MDE4NjU2","number":2086,"title":"sales + receivings item attributes support (#68)","user":{"login":"jekkos","id":576234,"node_id":"MDQ6VXNlcjU3NjIzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/576234?v=4","gravatar_id":"","url":"https://api.github.com/users/jekkos","html_url":"https://github.com/jekkos","followers_url":"https://api.github.com/users/jekkos/followers","following_url":"https://api.github.com/users/jekkos/following{/other_user}","gists_url":"https://api.github.com/users/jekkos/gists{/gist_id}","starred_url":"https://api.github.com/users/jekkos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekkos/subscriptions","organizations_url":"https://api.github.com/users/jekkos/orgs","repos_url":"https://api.github.com/users/jekkos/repos","events_url":"https://api.github.com/users/jekkos/events{/privacy}","received_events_url":"https://api.github.com/users/jekkos/received_events","type":"User","site_admin":false},"labels":[{"id":67840975,"node_id":"MDU6TGFiZWw2Nzg0MDk3NQ==","url":"https://api.github.com/repos/opensourcepos/opensourcepos/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"jekkos","id":576234,"node_id":"MDQ6VXNlcjU3NjIzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/576234?v=4","gravatar_id":"","url":"https://api.github.com/users/jekkos","html_url":"https://github.com/jekkos","followers_url":"https://api.github.com/users/jekkos/followers","following_url":"https://api.github.com/users/jekkos/following{/other_user}","gists_url":"https://api.github.com/users/jekkos/gists{/gist_id}","starred_url":"https://api.github.com/users/jekkos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekkos/subscriptions","organizations_url":"https://api.github.com/users/jekkos/orgs","repos_url":"https://api.github.com/users/jekkos/repos","events_url":"https://api.github.com/users/jekkos/events{/privacy}","received_events_url":"https://api.github.com/users/jekkos/received_events","type":"User","site_admin":false},"assignees":[{"login":"jekkos","id":576234,"node_id":"MDQ6VXNlcjU3NjIzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/576234?v=4","gravatar_id":"","url":"https://api.github.com/users/jekkos","html_url":"https://github.com/jekkos","followers_url":"https://api.github.com/users/jekkos/followers","following_url":"https://api.github.com/users/jekkos/following{/other_user}","gists_url":"https://api.github.com/users/jekkos/gists{/gist_id}","starred_url":"https://api.github.com/users/jekkos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekkos/subscriptions","organizations_url":"https://api.github.com/users/jekkos/orgs","repos_url":"https://api.github.com/users/jekkos/repos","events_url":"https://api.github.com/users/jekkos/events{/privacy}","received_events_url":"https://api.github.com/users/jekkos/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/milestones/13","html_url":"https://github.com/opensourcepos/opensourcepos/milestone/13","labels_url":"https://api.github.com/repos/opensourcepos/opensourcepos/milestones/13/labels","id":2821807,"node_id":"MDk6TWlsZXN0b25lMjgyMTgwNw==","number":13,"title":"3.3.0","description":"","creator":{"login":"daN4cat","id":636048,"node_id":"MDQ6VXNlcjYzNjA0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/636048?v=4","gravatar_id":"","url":"https://api.github.com/users/daN4cat","html_url":"https://github.com/daN4cat","followers_url":"https://api.github.com/users/daN4cat/followers","following_url":"https://api.github.com/users/daN4cat/following{/other_user}","gists_url":"https://api.github.com/users/daN4cat/gists{/gist_id}","starred_url":"https://api.github.com/users/daN4cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daN4cat/subscriptions","organizations_url":"https://api.github.com/users/daN4cat/orgs","repos_url":"https://api.github.com/users/daN4cat/repos","events_url":"https://api.github.com/users/daN4cat/events{/privacy}","received_events_url":"https://api.github.com/users/daN4cat/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":15,"state":"open","created_at":"2017-10-07T16:16:49Z","updated_at":"2018-08-17T00:37:51Z","due_on":"2018-12-30T08:00:00Z","closed_at":null},"comments":5,"created_at":"2018-08-17T00:35:31Z","updated_at":"2018-08-17T16:47:19Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/pulls/2086","html_url":"https://github.com/opensourcepos/opensourcepos/pull/2086","diff_url":"https://github.com/opensourcepos/opensourcepos/pull/2086.diff","patch_url":"https://github.com/opensourcepos/opensourcepos/pull/2086.patch"},"body":"After letting this code float for more than a year I finally managed to push through and polish what was there to finish a functional whole. A bit of a sad thing I got demotivated as the scope of the initial design was badly incepted by me and some things needed time to come to fruition. Also I found myself losing a lot of time in designing a good way to manage the attributes in the item form.\r\n\r\nI wanted to get this out as I'm leaving on a hike trip for a week to northern Sweden (lapland). I hope that some of you can find the time to review and test the branch before I return so I can do the necessary changes and fixes.\r\n\r\nLet me describe briefly what is in here.\r\n\r\n### Functionally\r\n* 'Custom' fields and all involved ugliness was removed from the config section\r\n* Item attributes can be created / edited  through the attributes module in the backoffice\r\n* 'Groups' of attributes can be defined. This serves as an easy way to add multiple attributes to an item when creating or updating it. For eg. in my case for running shoes we have both color and size that can be linked to the 'Shoes' Group attribute definition\r\n* Two levels of attribute visibility, being 'sales' and 'receivings'. This means that the values for those attribute definitions will be visible in the respective receipts\r\n* Three 'types' of attribute definitions\r\n - **DATE**: Renders the field in the item dialogue using a datepicker, and saves the values accordingly. Useful for saving 'expiry dates' on items or the like\r\n - **DROPDOWN**: Choose from a fixed set of values which you define in the attributes module. Rendered using a select box\r\n - **TEXT**: Just add some free text as an attribute value. This control is rendered using autocomplete widget and will optimally reuse existing database entries\r\n* Attribute 'values' are searchable through the existing attribute search flag in items screen. This should work as before with custom fields\r\n\r\n### Refactoring\r\n* Did some minor refactoring / cleanup here and there, mostly around the datepicker widget and table management\r\n\r\n### Extra focus for testing\r\n* Migration script is foreseen to move existing custom fields to the new attribute module system. I might **need some help from others** testing the specific SQL here as I don't have a database that used custom fields, so most testing was done on a clean situation\r\n\r\n### Design considerations\r\nI found that I lost a lot of time trying to think of an easy and concise way doing CRUD for attribute values for both the insert and update situation. In the end I found a nice way around by leveraging a server side ajax view refresh cycle that sends out form controls using javascript input. Personally I think this is  cleaner than trying to build the DOM form javascript itself, which is done in quite a lot of other places in the app. \r\n\r\n### Open ends\r\n* One thing that is still missing is a way to show attribute values in the items table by default. Initially I added a visibility flag for this but there's no code yet to handle showing attribute values in the items table.\r\n\r\nAnd now I gotta go make my backpack.."},"comment":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/comments/413924276","html_url":"https://github.com/opensourcepos/opensourcepos/pull/2086#issuecomment-413924276","issue_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/2086","id":413924276,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzkyNDI3Ng==","user":{"login":"odiea","id":10962177,"node_id":"MDQ6VXNlcjEwOTYyMTc3","avatar_url":"https://avatars2.githubusercontent.com/u/10962177?v=4","gravatar_id":"","url":"https://api.github.com/users/odiea","html_url":"https://github.com/odiea","followers_url":"https://api.github.com/users/odiea/followers","following_url":"https://api.github.com/users/odiea/following{/other_user}","gists_url":"https://api.github.com/users/odiea/gists{/gist_id}","starred_url":"https://api.github.com/users/odiea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odiea/subscriptions","organizations_url":"https://api.github.com/users/odiea/orgs","repos_url":"https://api.github.com/users/odiea/repos","events_url":"https://api.github.com/users/odiea/events{/privacy}","received_events_url":"https://api.github.com/users/odiea/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T16:47:19Z","updated_at":"2018-08-17T16:47:19Z","author_association":"COLLABORATOR","body":"Missing a comma on line 301 and 302 has a comma at the end of the line. Not anything major.\r\nERROR - 2018-08-17 16:42:48 --> Severity: error --> Exception: syntax error, unexpected ''multi_pack_enabled'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' C:\\wamp64\\www\\attributes\\application\\controllers\\Config.php 302\r\n"}}
{"actor":{"display_login":"odiea"}}