UTA-FabLab / fabapp

Operational Software for any fablab or makerspace
Other
19 stars 21 forks source link

Feature modification-Update option of Inventory system #48

Closed FabosaurusRex closed 3 years ago

FabosaurusRex commented 4 years ago

Found possibly-incorrect/undesirable function behavior while editing existing inventory: Selecting "Updated" as option when making a change adds the number given to the existing amount registered as being in stock - it may be preferable to replace the existing amount with the given number instead.

This is a call for Jeffrey to make since inventory control is his responsibility, so he should be consulted for preference before starting work on this.

FabosaurusRex commented 4 years ago

Asked Jeffrey, prefers to have the "Updated" choice replace the existing number rather than add/subtract from it.

FabosaurusRex commented 4 years ago

Was informed that the Accounts property cannot be set when editing a ticket - this should be accessible and is crucial for the abandoned prints process.

Edit - this isn't necessarily an issue to fix on this branch, i just needed to note it somewhere before i forgot.

Edit 2 - False alarm, just a misunderstanding.

FabosaurusRex commented 4 years ago

Needs to be fixed and ready for testing by Oct. 12.

FabosaurusRex commented 4 years ago

Jeffrey needs another pre-formatted query for doing abandoned prints - tacking that upgrade on to this issue.

Query is for returning all transactions with a charge on the Bursar's account.

FabosaurusRex commented 4 years ago

The inventory's structure makes this a big pain to do - marking as "won't fix" for this version and will incorporate the request into the next version of FabApp.

Still adding the pre-formatted query in through this, however.

FabosaurusRex commented 4 years ago

Began adding prebuilt query, have a working SQL statement but page returns error message "Error in query submission" when "Get Query" is submitted with valid dates stipulated.

MPZinke commented 4 years ago

Tentatively added query. Issue described on October 2, 2020 occured from unaccounted for empty query result. Empty queries no longer throw an error in downstreams processes.
Requested query used apostrophes instead of grave accents (causing a syntax error). This was fixed. Finally, requested option was added to admin/stats.php. Because HEAD of #48-Update_inventory_options (and would prove more difficult to pull/merge/etc), changes have been made to branch Feature-#48

FabosaurusRex commented 4 years ago

Still getting an "Error in Query Submission" message when I upload the branch and try to run the query. The date picker is nice, though.

MPZinke commented 4 years ago

Dev server is pickier than AMPPS server, which is why issue did not occur on localhosted testing. Issue involved pie_chart_label_column and pie_chart_data_column not being posted to admin/sub/stats_ajax_requests.php. To fix this, the missing variables were added to the posted data. Additionally, I found that the excel document exporter methods were not compatible with the "new" (c.a. 1 year ago) AJAX changes. Finally, adjusted variable name for variable passed to self::query_contains_prohibited_words($query) in DatabaseQuery::constructor. This wrong variable name meant it was not actually checking the query for naughty words (SQL injections).

FabosaurusRex commented 4 years ago

The excel export just produces a document containing "[objectHTMLInputElement]" in it and nothing else. Search works correctly, however.

FabosaurusRex commented 4 years ago

Excel export is a seperate issue that may or may not get fixed, marking this as passing dev testing.

MPZinke commented 4 years ago

New lines are not preserved in AJAX requests. To work around this, the lines are joined around "\n". This is then replaced on the front end to a newline. See commit d36523f on Feature-#48 for specifics.

FabosaurusRex commented 3 years ago

Fix has been rolled out to production. Closing issue.