{"action":"created","issue":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11697","repository_url":"https://api.github.com/repos/civicrm/civicrm-core","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11697/labels{/name}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11697/comments","events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11697/events","html_url":"https://github.com/civicrm/civicrm-core/pull/11697","id":298686338,"number":11697,"title":"CRM-21784 Display custom data when viewing recurring contributions","user":{"login":"mattwire","id":2052161,"avatar_url":"https://avatars1.githubusercontent.com/u/2052161?v=4","gravatar_id":"","url":"https://api.github.com/users/mattwire","html_url":"https://github.com/mattwire","followers_url":"https://api.github.com/users/mattwire/followers","following_url":"https://api.github.com/users/mattwire/following{/other_user}","gists_url":"https://api.github.com/users/mattwire/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwire/subscriptions","organizations_url":"https://api.github.com/users/mattwire/orgs","repos_url":"https://api.github.com/users/mattwire/repos","events_url":"https://api.github.com/users/mattwire/events{/privacy}","received_events_url":"https://api.github.com/users/mattwire/received_events","type":"User","site_admin":false},"labels":[{"id":246037889,"url":"https://api.github.com/repos/civicrm/civicrm-core/labels/master","name":"master","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-02-20T17:43:48Z","updated_at":"2018-03-24T02:53:56Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11697","html_url":"https://github.com/civicrm/civicrm-core/pull/11697","diff_url":"https://github.com/civicrm/civicrm-core/pull/11697.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/11697.patch"},"body":"Overview\r\n----------------------------------------\r\nYou can add custom data fields to recurring contributions easily via the custom data admin UI.  However, it's not possible to view them anywhere except via the API.  This PR fixes that so they show up when viewing the recurring contribution.\r\n\r\nBefore\r\n----------------------------------------\r\nCustom data not visible.\r\n![localhost_8000_civicrm_contact_view_contributionrecur_reset 1 id 64 cid 206 context contribution](https://user-images.githubusercontent.com/2052161/36439682-8ed905d2-1665-11e8-91f6-ddecd3f267b7.png)\r\n\r\n![civitest1 mjw-consult co uk_civicrm_contact_view_reset 1 cid 5 selectedchild contribute](https://user-images.githubusercontent.com/2052161/36445451-3bc9b98e-1676-11e8-8f85-d9cdab4b9f31.png)\r\n\r\nAfter\r\n----------------------------------------\r\nCustom data visible, using the same method as for other entities.\r\n![localhost_8000_civicrm_contact_view_contributionrecur_reset 1 id 64 cid 206 context contribution 1](https://user-images.githubusercontent.com/2052161/36439691-93075ef6-1665-11e8-81a2-33bf4929e414.png)\r\n\r\nNote: processor column is no longer visible and has been moved to a separate issue: https://lab.civicrm.org/dev/financial/issues/4\r\n\r\n![civitest1 mjw-consult co uk_civicrm_contact_view_reset 1 cid 5 selectedchild contribute 1](https://user-images.githubusercontent.com/2052161/36445456-3e8c7472-1676-11e8-97c5-b5eea877c98f.png)\r\n\r\nTechnical Details\r\n----------------------------------------\r\nThis PR does 3 things:\r\n1. Switch the data source for the recurring contributions on the contribution tab to use the API instead of BAO/DAO functions.  This simplifies the code and makes all fields available to smarty so the tab can be easily customised by extensions (eg. to highlight ones with a particular custom field value).  This also has the side-benefit of deprecating a BAO function that is only used once.\r\n\r\n2. Switch the data source for the \"View recurring contribution\" page to use the API instead of BAO/DAO functions.  This simplifies the code and makes all fields available so that the standard \"view custom data\" functions and smarty tpl can automatically display custom data in the standard format.  This also makes \"financial_type\" visible at all times even if it cannot be changed - it makes sense to stop it being edited but I don't think it makes sense to hide it from view by default as well.\r\n\r\n3. Modify the \"View recurring contribution\" page smarty template to add in the standard custom data template and allow custom data to magically appear.\r\n---\r\n\r\n * [CRM-21784: View custom data for recurring contributions](https://issues.civicrm.org/jira/browse/CRM-21784)"},"comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments/375841560","html_url":"https://github.com/civicrm/civicrm-core/pull/11697#issuecomment-375841560","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11697","id":375841560,"user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars2.githubusercontent.com/u/336308?v=4","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T02:53:55Z","updated_at":"2018-03-24T02:53:55Z","author_association":"CONTRIBUTOR","body":"I'm going to merge this based on @omarabuhussein review & it generally being a good idea to be able to see this custom data. I have some reservations about the implementation because I would like it to be generic enough to apply to 'any' entity - but I don't think it makes sense to block this until that is resolved"}}
{"actor":{"display_login":"eileenmcnaughton"}}