{"action":"created","issue":{"url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/102","labels_url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/102/comments","events_url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/102/events","html_url":"https://github.com/iATSPayments/com.iatspayments.civicrm/issues/102","id":120644250,"number":102,"title":"failed transactions are being counted together with completed transactions and subscriptions are being prematurely marked completed","user":{"login":"KarinG","id":5340555,"avatar_url":"https://avatars.githubusercontent.com/u/5340555?v=3","gravatar_id":"","url":"https://api.github.com/users/KarinG","html_url":"https://github.com/KarinG","followers_url":"https://api.github.com/users/KarinG/followers","following_url":"https://api.github.com/users/KarinG/following{/other_user}","gists_url":"https://api.github.com/users/KarinG/gists{/gist_id}","starred_url":"https://api.github.com/users/KarinG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarinG/subscriptions","organizations_url":"https://api.github.com/users/KarinG/orgs","repos_url":"https://api.github.com/users/KarinG/repos","events_url":"https://api.github.com/users/KarinG/events{/privacy}","received_events_url":"https://api.github.com/users/KarinG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-06T16:36:29Z","updated_at":"2016-01-13T16:41:44Z","closed_at":null,"body":"Part of: https://github.com/iATSPayments/com.iatspayments.civicrm/issues/93 - reported by Tamar"},"comment":{"url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/comments/171357725","html_url":"https://github.com/iATSPayments/com.iatspayments.civicrm/issues/102#issuecomment-171357725","issue_url":"https://api.github.com/repos/iATSPayments/com.iatspayments.civicrm/issues/102","id":171357725,"user":{"login":"KarinG","id":5340555,"avatar_url":"https://avatars.githubusercontent.com/u/5340555?v=3","gravatar_id":"","url":"https://api.github.com/users/KarinG","html_url":"https://github.com/KarinG","followers_url":"https://api.github.com/users/KarinG/followers","following_url":"https://api.github.com/users/KarinG/following{/other_user}","gists_url":"https://api.github.com/users/KarinG/gists{/gist_id}","starred_url":"https://api.github.com/users/KarinG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarinG/subscriptions","organizations_url":"https://api.github.com/users/KarinG/orgs","repos_url":"https://api.github.com/users/KarinG/repos","events_url":"https://api.github.com/users/KarinG/events{/privacy}","received_events_url":"https://api.github.com/users/KarinG/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T16:41:44Z","updated_at":"2016-01-13T16:41:44Z","body":"Hi - there are lots of bits here - keep in mind there may be some confusion - as many of your recurring series would have been started before you added this code fix. \r\n\r\n1. we're now properly checking installments_done vs installments (do be done) - even for recurring series marked Completed or in Progress - as the number of installments may have changed (up or down).\r\n\r\n2. so your first point - Failed contributions are created even though credit card is expired - that suggests that the number of installments to be done does not yet match the number of installments (completed or pending). So that's a good thing - it's trying again - and the Failed contribution is a note to your staff - to phone the member and update the credit card. \r\n\r\n3. Completed - ah that is legacy here - it used to be Completed - but it really wasn't. It does not affect the math/or the attempts - the code already evaluates whether a series is really Completed (or not). However - I have just added in some code to help with this transition. If we now discover that the number of installments done is still less than the number of installments to be done -> I'm now explicitly setting the contribution_status_id for the series to 5 (in progress):\r\n\r\nhttps://github.com/iATSPayments/com.iatspayments.civicrm/commit/12087f107cce265c95febb5df7ef8a81885193a5\r\n\r\n \r\n\r\n\r\n"}}