Answers.Body: <p>I was able to isolate the CiviDiscount tracking problem in a separate sandbox site. Using Drupal Commons at the latest version, CiviCRM 4.7.4, and CiviDiscount 3.3, with no customizations or other modules installed, I tested discount codes and they were not tracked, just as described in my question. </p>
  
  <p>When I upgraded to the latest version of CiviCRM (4.7.14) the issue was resolved. </p>
  
  <p>In my first round of testing using a sandbox, I had installed Drupal but not Drupal Commons and CiviCRM 7.4.9 and the discount code worked properly. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-05T23:33:32.997Z
Answers.Text: Glad you figured it out! Now onto 4.7.15 (just released) 
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-05T22:01:28.583Z
Answers.LastActivityDate: 2017-01-05T22:06:28.943Z
Answers.LastEditDate: 2017-01-05T22:06:28.943Z
Answers.UserDisplayName: Christia
Answers.Body: <p>I'll ad this as an answer so it's not lost in a comment. 
  Steps to figure this out would be:</p>
  
  <ol>
  <li><p>CiviDiscount is installed on demo/dmaster: try and reproduce your scenario/bug on demo/dmaster - starting by adding discount config here: <a href="http://dmaster.demo.civicrm.org/civicrm/cividiscount" rel="nofollow noreferrer">http://dmaster.demo.civicrm.org/civicrm/cividiscount</a></p></li>
  <li><p>If you can reproduce the issue you're seeing on:
  <a href="http://dmaster.demo.civicrm.org/civicrm" rel="nofollow noreferrer">http://dmaster.demo.civicrm.org/civicrm</a> - then file an issue here:
  <a href="https://github.com/dlobo/org.civicrm.module.cividiscount/issues" rel="nofollow noreferrer">https://github.com/dlobo/org.civicrm.module.cividiscount/issues</a></p></li>
  <li><p>If things are working properly on <a href="http://dmaster.demo.civicrm.org/civicrm" rel="nofollow noreferrer">http://dmaster.demo.civicrm.org/civicrm</a> - the issue may have been resolved and you would then look at upgrading your own instance to that CiviCRM version/CiviDiscount version.</p></li>
  </ol>
  
  <p>All the best!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T04:04:38.090Z
Answers.Text: This is great information, thanks for adding! I edited my question to include that I have been unable to reproduce the problem on other sites.
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T04:26:34.507Z
Answers.Text: Have you tried reproducing it on dmaster though? That is the one that really matters for possible bugs/issues
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T05:22:51.297Z
Answers.Text: If you mean the one you just provided links to, then yes, I have set it up the same way as on my website and it works.
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T05:27:16.033Z
Answers.Text: So you'll want to get to the same versions i.e. 4.7.14 and latest CiviDiscount
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-02T03:15:03.963Z
Answers.LastActivityDate: 2017-01-02T03:15:03.963Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>(Now CiviCRM 4.7.0, Drupal Commons 7.50 and CiviDiscount 3.3)</p>
  
  <p>If a user uses a coupon code, the coupon code is no longer tracking the number of times it is used or who used it. It appeared to be working until I realized that it only tracks two situations: if there was money exchanged (not a 100% discount) and/or if the coupon was used during a transaction put in on the backend and not by the user.</p>
  
  <p>Furthermore, you should be able to assign an organization to the code so that the "codes assigned" and "codes used" is tracked. As it sits, those tabs do not report anything.</p>
  
  <p>Screenshot of how discount code is set up:
  <a href="https://i.sstatic.net/GGRsX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GGRsX.png" alt="enter image description here"></a></p>
  
  <p>Screenshot of membership:
  <a href="https://i.sstatic.net/rBnrU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rBnrU.png" alt="enter image description here"></a></p>
  
  <p>Screenshot of price set used:
  <a href="https://i.sstatic.net/UjXCk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UjXCk.png" alt="enter image description here"></a></p>
  
  <p>Also, when I first look up "Test Organization for Code", the organization that I applied the the test discount to, the tab clearly shows that there is a code assigned, however, when the tab is clicked on, nothing shows and the value is changed to zero. This could be an important clue.
  <a href="https://i.sstatic.net/lcS6S.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lcS6S.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/ISRkV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ISRkV.png" alt="enter image description here"></a></p>
  
  <p>Lastly, here you can see a MySQL table showing all recorded uses of the same code (item_id=2) but the data is being recorded differently. The last 4 were entered through CiviCRM and the first 2 were entered through a Contribution page, when it was still tracking; there should be about 25 rows, but the rest of the uses were never recorded:
  <a href="https://i.sstatic.net/H89Rn.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/H89Rn.png" alt="enter image description here"></a></p>
  
  <p>Here you can see where the discount code that was used is still reporting 0 uses:
  <a href="https://i.sstatic.net/NeTyk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NeTyk.png" alt="enter image description here"></a></p>
  
  <p>Here you can see where the test user that used the code is still showing that no code was used:
  <a href="https://i.sstatic.net/kJmNf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kJmNf.png" alt="enter image description here"></a></p>
  
  <p><strong>Things I've Tried:</strong></p>
  
  <ul>
  <li>Changing CiviCRM to a standard install. </li>
  <li>Upgrading Drupal Core, CiviCRM and CiviDiscount to latest major versions. </li>
  <li>Was unable to reproduce the error on my own simplified sandbox using the same versions</li>
  </ul>
  
  <p>(Edited from running CiviCRM 4.3.8 with Drupal 7.37 (Commons))</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-19T15:52:06.667Z
Comments.Text: Have you updated CiviDiscount since you first installed it?  CiviCRM 4.3.8 is a very old version, and updates to CiviDiscount wouldn't be tested against it.  Do you have a test version of your site you could upgrade to the latest version of 4.6 or 4.7 and see if that solves your issue?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-31T00:40:35.390Z
Comments.Text: I upgraded the CiviCRM to 4.7, Drupal to 7.5 and CiviDiscount to 3.3 but still no luck.
Comments.UserDisplayName: Christia
Tags: <drupal><cividiscount>
Title: CiviDiscount Isn't Tracking Usage
ThreadText: # CiviDiscount Isn't Tracking Usage
  
  (Asked by: username_0 on 2016-06-17)
  
  (Now CiviCRM 4.7.0, Drupal Commons 7.50 and CiviDiscount 3.3)
  
  If a user uses a coupon code, the coupon code is no longer tracking the number of times it is used or who used it. It appeared to be working until I realized that it only tracks two situations: if there was money exchanged (not a 100% discount) and/or if the coupon was used during a transaction put in on the backend and not by the user.
  
  Furthermore, you should be able to assign an organization to the code so that the "codes assigned" and "codes used" is tracked. As it sits, those tabs do not report anything.
  
  Screenshot of how discount code is set up:
  [![enter image description here](https://i.sstatic.net/GGRsX.png)](https://i.sstatic.net/GGRsX.png)
  
  Screenshot of membership:
  [![enter image description here](https://i.sstatic.net/rBnrU.png)](https://i.sstatic.net/rBnrU.png)
  
  Screenshot of price set used:
  [![enter image description here](https://i.sstatic.net/UjXCk.png)](https://i.sstatic.net/UjXCk.png)
  
  Also, when I first look up "Test Organization for Code", the organization that I applied the the test discount to, the tab clearly shows that there is a code assigned, however, when the tab is clicked on, nothing shows and the value is changed to zero. This could be an important clue.
  [![enter image description here](https://i.sstatic.net/lcS6S.png)](https://i.sstatic.net/lcS6S.png)
  
  [![enter image description here](https://i.sstatic.net/ISRkV.png)](https://i.sstatic.net/ISRkV.png)
  
  Lastly, here you can see a MySQL table showing all recorded uses of the same code (item\_id=2) but the data is being recorded differently. The last 4 were entered through CiviCRM and the first 2 were entered through a Contribution page, when it was still tracking; there should be about 25 rows, but the rest of the uses were never recorded:
  [![enter image description here](https://i.sstatic.net/H89Rn.png)](https://i.sstatic.net/H89Rn.png)
  
  Here you can see where the discount code that was used is still reporting 0 uses:
  [![enter image description here](https://i.sstatic.net/NeTyk.png)](https://i.sstatic.net/NeTyk.png)
  
  Here you can see where the test user that used the code is still showing that no code was used:
  [![enter image description here](https://i.sstatic.net/kJmNf.png)](https://i.sstatic.net/kJmNf.png)
  
  **Things I've Tried:**
  
  * Changing CiviCRM to a standard install.
  * Upgrading Drupal Core, CiviCRM and CiviDiscount to latest major versions.
  * Was unable to reproduce the error on my own simplified sandbox using the same versions
  
  (Edited from running CiviCRM 4.3.8 with Drupal 7.37 (Commons))
  
  **Tags:** drupal, cividiscount
  
  > **Comments:**
  > **username_1**: Have you updated CiviDiscount since you first installed it?  CiviCRM 4.3.8 is a very old version, and updates to CiviDiscount wouldn't be tested against it.  Do you have a test version of your site you could upgrade to the latest version of 4.6 or 4.7 and see if that solves your issue?  
  > **username_0**: I upgraded the CiviCRM to 4.7, Drupal to 7.5 and CiviDiscount to 3.3 but still no luck.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-01-05. Score: 2 | Accepted answer
  
  I was able to isolate the CiviDiscount tracking problem in a separate sandbox site. Using Drupal Commons at the latest version, CiviCRM 4.7.4, and CiviDiscount 3.3, with no customizations or other modules installed, I tested discount codes and they were not tracked, just as described in my question.
  
  When I upgraded to the latest version of CiviCRM (4.7.14) the issue was resolved.
  
  In my first round of testing using a sandbox, I had installed Drupal but not Drupal Commons and CiviCRM 7.4.9 and the discount code worked properly.
  
  > **Comments:**
  > **username_2**: Glad you figured it out! Now onto 4.7.15 (just released)   
  
  ---
  
  ### Answer by username_2 on 2017-01-02. Score: 2
  
  I'll ad this as an answer so it's not lost in a comment.
  Steps to figure this out would be:
  
  1. CiviDiscount is installed on demo/dmaster: try and reproduce your scenario/bug on demo/dmaster - starting by adding discount config here: <http://dmaster.demo.civicrm.org/civicrm/cividiscount>
  2. If you can reproduce the issue you're seeing on:
     <http://dmaster.demo.civicrm.org/civicrm> - then file an issue here:
     <https://github.com/dlobo/org.civicrm.module.cividiscount/issues>
  3. If things are working properly on <http://dmaster.demo.civicrm.org/civicrm> - the issue may have been resolved and you would then look at upgrading your own instance to that CiviCRM version/CiviDiscount version.
  
  All the best!
  
  > **Comments:**
  > **username_0**: This is great information, thanks for adding! I edited my question to include that I have been unable to reproduce the problem on other sites.  
  > **username_2**: Have you tried reproducing it on dmaster though? That is the one that really matters for possible bugs/issues  
  > **username_0**: If you mean the one you just provided links to, then yes, I have set it up the same way as on my website and it works.  
  > **username_2**: So you'll want to get to the same versions i.e. 4.7.14 and latest CiviDiscount  
  
  ---
  
  