Inventory Development Log

Suggested IDE Setup

See here for a suggested IDE and debug setup.

Potential Future Errors

  • The inventory searching is done by putting the variables in the URL in the form of a GET request. This may cause an error in browsers that have a limited number of characters they can handle. The max I've counted in the search bar is approx 3500 during an advanced search query.

Performance Caveats

  • Everytime a search is made, a search will be conducted on both the inventory and history tables--this is redundant since this happens even when history results are not desired.
    This was fixed by rewriting the main search function in the model.
    

Ideas for Improvement

  • Include a saved history for searches. I.e. use the cache to store searches locally so saved searches can be repeated and/or edited easily.
  • Use 2 checkboxes instead of radio buttons. Will need to use javascript and jQuery to ensure that one is selected at all times (could use a check before sending).

Bugs Found

  • When applying the maximum search result, it counts both active and inactive. This is easy to fix, the options for active and inactive just need to be included in the query string.

Current Errors

  • Css not rendering when searching through current and active and then clicking on an arrow next to a displayed results

CSS Error

  • In the compass of a single query, "History, active" and with the options "barcode: contains: CS00" and "equipment Type: contains: Printer". Two different items in the list have been clicked on. The first item's URL is "http://localhost/inv/web/inventory/index.php?r=inventory/update&id=16144" and produces an error. The second URL is "http://localhost/inv/web/inventory/index.php?r=inventory/update&id=15395" and doesn't produce a rendering error.
The following Produce errors: The following works fine:

The problem has been traced to line 922 in _form.php in the line "$this->renderPartial('_rt', array('rt'=>$rtModel->getRT($model->hostDomainName)));"

Initial thought is that model->hostDomainName doesn't exist, but after checking it seems even in the URL's that work, the attribute hostDomainName doesn't exist.

Points of Bad Coding Style

  • Whether the user requests active or inactive, all results are gathered and in the VIEW the results are filtered. This made it very difficult to find since it is expected that the model will be in charge of handling the data and what data to include, not the view pages, which should only render what is given to it. This also creates redundancy and error since the active and non-active records are counted against the "maximum search result" variable and moreover Yii is handling needless data (wasting computer cycles on the server).

Change Log

  1. Added Radio Buttons for Searching through History and Current. (Have not implemented the Logic Yet).
  2. Moved Logic for querying active vs Inactive records to the model. How it worked before was that both active and inactive records were queried and then the results were filtered in the view. This is double handling data that doesn't need to be handled and it is confusing for the programmer who is expecting to find the logic for handling the data in the model.
  3. Added radio buttons for selecting the search scope. I.e. (Current/History and Active/Inactive)
-- ChrisGravel - 2015-01-19
Edit | Attach | Watch | Print version | History: r10 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2015-01-20 - ChrisGravel
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback