Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2140

Implement downloads functionality to save app download count to the database

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Attachments

        Activity

        Hide
        rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - - edited

        Issue:
        Implement downloads functionality to save app download count to the database

        Solution:
        To save the download count of apps in database whenever a user installs app. The download count will now be saved in ReleaseDownloadByDates instead of apps and release model.

        File changed:
        apps/models.py
        apps/search_indexes.py
        apps/templates/app_button.html
        apps/templates/app_page.html
        apps/templatetags/app_buttons.py
        apps/views.py
        download/templates/app_stats.html
        download/urls.py
        download/views.py
        python_packages.txt
        static/apps/js/app_page.js
        submit_app/models.py
        submit_app/views.py

        Code changes are present in branch - https://bitbucket.org/rpatil14/appstore_riddhi/branch/IGBF-2140-download#diff

        Testing steps:
        1) Scenario 1:

        • Submit an app and accept it.
        • Install the app by clicking install button.
          Result - The download count on app page should be incremented. Entry should get created in ReleaseDownloadByDates table with today's date for that particular release.

        2) Scenario 2:

        • Submit an app and accept it.
        • Install the app by clicking install button.
          Result - Click on the Downloads link present on the App page. Click on Save as CSV button on the Download stats page to download releases download count per release as CSV.
          CSV should have following format - Date, release1, release2, ......, Total

        3) Scenario 3:

        • Submit an app and accept it.
        • Install the app by clicking install button.
          Result - Click on the Downloads link present on the App page. The total Downloads should should overall download count for the app for all releases.

        4) Scenario 4:

        • Click on all apps on the home screen
        • Click on Downloads to sort the apps in Ascending and Descending order of the download count. The download count is per app and not per release.

        5) Scenario 5:

        • All the apps on the home page should be displayed in descending order of download count. The download count is per app and not per release.

        6) Scenario 6:

        • Search functionality should work as expected.

        7) Scenario 7:

        • Submit an app and accept it.
          Result - Click on the Downloads link present on the App page. The Save as CSV button on the Download stats page should be disabled as the app is not yet downloaded.

        Testing results:
        Code changes are deployed to https://dev-appstore-6.bioviz.org. Admin username and password for devappstore6 is same as devappstore2

        Note:
        Run command "pip install -r python_packages.txt" to install new package "pandas" required for this task

        cc. [~aloraine]

        Show
        rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - - edited Issue: Implement downloads functionality to save app download count to the database Solution: To save the download count of apps in database whenever a user installs app. The download count will now be saved in ReleaseDownloadByDates instead of apps and release model. File changed: apps/models.py apps/search_indexes.py apps/templates/app_button.html apps/templates/app_page.html apps/templatetags/app_buttons.py apps/views.py download/templates/app_stats.html download/urls.py download/views.py python_packages.txt static/apps/js/app_page.js submit_app/models.py submit_app/views.py Code changes are present in branch - https://bitbucket.org/rpatil14/appstore_riddhi/branch/IGBF-2140-download#diff Testing steps: 1) Scenario 1: Submit an app and accept it. Install the app by clicking install button. Result - The download count on app page should be incremented. Entry should get created in ReleaseDownloadByDates table with today's date for that particular release. 2) Scenario 2: Submit an app and accept it. Install the app by clicking install button. Result - Click on the Downloads link present on the App page. Click on Save as CSV button on the Download stats page to download releases download count per release as CSV. CSV should have following format - Date, release1, release2, ......, Total 3) Scenario 3: Submit an app and accept it. Install the app by clicking install button. Result - Click on the Downloads link present on the App page. The total Downloads should should overall download count for the app for all releases. 4) Scenario 4: Click on all apps on the home screen Click on Downloads to sort the apps in Ascending and Descending order of the download count. The download count is per app and not per release. 5) Scenario 5: All the apps on the home page should be displayed in descending order of download count. The download count is per app and not per release. 6) Scenario 6: Search functionality should work as expected. 7) Scenario 7: Submit an app and accept it. Result - Click on the Downloads link present on the App page. The Save as CSV button on the Download stats page should be disabled as the app is not yet downloaded. Testing results: Code changes are deployed to https://dev-appstore-6.bioviz.org . Admin username and password for devappstore6 is same as devappstore2 Note: Run command "pip install -r python_packages.txt" to install new package "pandas" required for this task cc. [~aloraine]
        Hide
        ann.loraine Ann Loraine added a comment -

        Please submit PR.

        Show
        ann.loraine Ann Loraine added a comment - Please submit PR.
        Show
        rpatil14 Riddhi Jagdish Patil (Inactive) added a comment - Pull request submitted: https://bitbucket.org/lorainelab/appstore/pull-requests/166/igbf-2140-save-app-download-information-to/diff
        Hide
        ann.loraine Ann Loraine added a comment -

        Deployed on dev-appstore-2 and ready for testing.
        Riddhi Jagdish Patil
        Pawan Bole

        Show
        ann.loraine Ann Loraine added a comment - Deployed on dev-appstore-2 and ready for testing. Riddhi Jagdish Patil Pawan Bole
        Hide
        pbole Pawan Bole (Inactive) added a comment -

        Verified all the test scenarios and all are working as expected.

        Show
        pbole Pawan Bole (Inactive) added a comment - Verified all the test scenarios and all are working as expected.

          People

          • Assignee:
            rpatil14 Riddhi Jagdish Patil (Inactive)
            Reporter:
            rpatil14 Riddhi Jagdish Patil (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: