Research Subscriptions Developer Documentation

Software Location

On the old Ubuntu 12.04 webserver, the code is installed on www152.cs in /software/odyssey-3_apache/data/vhosts/cs.uwaterloo.ca/cscf/research/sub/. It runs as user cs-rsub.

On the new Ubuntu 16.04 webserver, the code is installed on linux.cs in /var/www/cs.uwaterloo.ca/cscf/research/sub/. It runs as user cs-rsub.

The code is located at https://git.uwaterloo.ca/cscf/subscription/ (with access limited to CSCF group).

Mysql database access to rt_ist requires port-forwarding via www152.cs: ssh -L3306:rt44.uwaterloo.ca:3306 www152.cs.uwaterloo.ca

Contact Daniel Allen for a database dump.

Schema

A schema diagram can be found here:
https://odyssey.uwaterloo.ca/sub-dev/Schema.png

A set of schema annotations can be found here:
https://odyssey.uwaterloo.ca/sub-dev/schema-only-comments.sql
(Open it in a text editor to view it.)

Daily Cron Job

There is a daily cron-job installed for user cs-rsub to generate the list of current subscriptions publicly visible at https://cs.uwaterloo.ca/cscf/research/contact This cron-job currently looks like: 38 7 * * * cd /software/odyssey-3_apache/data/vhosts/cs.uwaterloo.ca/cscf/research/sub && php5-cgi out.php > /dev/null 2>&1

Testing

This is for testing that the changes to the code do not break the functionality of the subscription system.

  • Load a subscription page. (ex: https://$URL/sub/view.php?account=sc-ai)
    • Ensure the term selection on the right is working.
    • Make sure all the data is being displayed for all the term views.
    • Verify that all the fields on the left are properly being displayed.

  • Make a change on the subscription page and ensure that the save works properly without error.

  • Make a change to the "Faculty" field data, specifically the payment distributions. (save these)

  • Now hit the billing button on the same subscription page.
    • Make sure the billing is displaying correctly on this page. There should be a nice list of debit and credit entries for each charge.
    • Make sure that the total incurred charge total is correct. The total incurred field is directly under the charges table.
    • Attempt to add a charge. (Add both debit and credit charges and check to make sure they both affect the total incurred value)
  • Click to generate the bill.
    • Verify that the download button for both the LaTeX file works correctly and that the pdf download works correctly. Make sure both of these files contain the correct information.
  • Also now test generating ALL the bills. To get there you can go to "Admin" -> "Billing" or simply from the subscription page you are on you can just hit "Back to all". Hit the "Generate Bills" button.
  • On the "Admin" page make sure that the normal functions are working correctly.
    • Click on new term and go through the steps to create a new term and make sure the new term is created properly.
    • Click on the "Review" tab in the Admin tab and check to make sure the review data is generated correctly.
    • Lastly check and make sure the "Report", "Users" and "Subscription" pages all fill their tables correctly with all of their data.

Code Design and Setup Instructions

ResearchSubscriptionsDevelopment

Change Log

v.3.3.2

/RT#807271
  • Bug fixes on annual billing
  • can delete users in view account
  • Documentation: reviewing user docs; documenting dev setup

v.3.3.1

/RT#636949.
  • Uses annual billing for 2017 onward.

v.3.3

The umbrella ST for version 3.3.3 is /ST#108355.
  • Uses campus RT.

v3.2.2

The umbrella ST for version 3.2.2 is ST#99367.

  • ST#102984: Bug: Shouldn't be able to add a user with no information.
  • ST#102903: Bug: Logging out doesn't log you out.
  • ST#102798: Enhance documentation.
  • ST#102799: Create a trashable system clone for development.
  • ST#102512: Bug: Can't add a new subscription.
  • ST#99868: Bug: Dedicated Units Billed being set to number of machines on dedicated subscriptions.
  • ST#98667: Add button to allow deletion of user.
  • ST#98486: Bug: Can't remove faculty from subscription after Change Account has been clicked.

v3.2.1

This new version adds a FORE Spreadsheet generator which can be found by going to the "Admin" page and then clicking on the "FORE Spreadsheet" button in the top right area. The change has been documented in ST#95180 and the instructions on how to use the new page will be included on this page.

v3.2.0

The changes for this changeset generally are based around a modification of how the userpayment system works for the faculty. The ST#94980 holds the ST's related to the v3.2.0 changeset. Below is a summary of these changes

  • Added a new way to organize payments. You can now choose to use "Even", "$", or "%" as the method in which you specificy how a group is going to be distributing their payments. (ST#95177)
To use the new payment option you will see now in the subscription view a new option to input users and state how they pay. The data that you will see prepopulated in this field is the old data from the old Faculty field.

v3.0.2

  • Bills should no longer be off by 1 cent ( ST#88706)
  • The "total incurred" amount no longer will be rounded to a odd scientific notation number ( ST#88706)
  • A new field has been added named "Ignore Total Check" ( TWiki Info on this). Checking this will ignore total checking allowing a user to over or underpaid. If this is not checked the process will proceed as normal, warning you if the total being paid is not correct. ( ST#88706)
  • There was an instance of the word "incurred" being spelt wrong, this has been fixed ( ST#88358)
  • Comments created on review page now are actually saved ( ST#88707)

See Also

-- JeffGuild - 2015-12-07 - Split developer documentation off from ResearchSubscriptionUserDocs

Topic revision: r10 - 2019-01-08 - DanielAllen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback