V2, MAPS and Infrastructure - Design and Implementation Issues
Contents
- V2, MAPS and Infrastructure - Design and Implementation Issues
- Introduction
-
V2 Issues
- Access Rights for Documents and Revisions (Status: Decided)
- Allow entry of only one of min/max object classification fields (Status: Decided)
- Moving Model Attributes to Classifications (Status: Done)
- Using 'Distinct' in Search SQL (Status: Open)
- Sorting Lists by Classification Code and Value (Status: Solved)
- Specifying Selection Predicates on Searching by Classification (Status: Decided)
- Classification Sorting is Always Behind Other Field Sorting (Status: Open)
- Back/Cancel Buttons (Status: Decided)
- Full Path in the Classification Select Lists (Status: Open)
- Opening/Closing Blocks on the GUI (Status: implemented)
- MAPS Issues
- Infrastructure Issues
Introduction
Includes issues associated with:
- V2
- MAPS
- Infrastructure
V2 Issues
Access Rights for Documents and Revisions (Status: Decided)
Assumptions:
- Customers are likely to understand folders as a means of controlling who can view and update documents and revisions
Long-Term requirements:
- It should be possible to hide documents from certain users
- It should be possible to hide specific revisions from certain users
- Because the latest revision is not complete or not yet issued
- Because an intermediate revision was never issued
Issues:
- If a revision belongs to a folder and a document not:
- How are updates to its document recode, the document code and classifications, controlled?
Every user who has an any folder update permission will have the possibility to create a version to every document where the user can read any of its revision.
- If a document belongs to a folder and its revisions can belong to different folders:
Every user who has an any folder update permission will have the possibility to create a version to every document the user can read.
- If a document belongs to a folder, including all its revisions, how can you hide/show specific revisions?
Ideas:
Implement a hidden flag in revisions and an extra read role that allows viewing of hidden revisions
- The normal view role would not show hidden revisions
- Update role would include the ability to view hidden revisions
Decision:
- The document's folder will will determine the access and update permissions for all its revisions and associated files
- Use the folder_id in the documents record to grant access to revisions
- Hidden revisions and restricted read permissions will not be implemented in the first release
- Working files should only be accessible to users with the update role on the document's folder
Allow entry of only one of min/max object classification fields (Status: Decided)
Issues:
Currently both of the min/max object classification fields are required fields if the min_max_flag is set in the associated classification.
- The are use cases when only one of the min/max fields would be used. E.g. Setting only the min field could mean that the classification is valid from the min value chainage to the end of the tunnel
Suggested implementation:
It is simple a validation issue in model ObjectClassification.
Decision:
- Leave the validation as is for now and re-evaluate later based on customer feedback
Moving Model Attributes to Classifications (Status: Done)
Issue:
- Moving some model attributes to classifications has advantages:
- More than one classification value can be entered
- Projects that don't need them can delete them from the system.
- Affected attributes:
Document.code_alternate
Revision.code_alternate
Task.task_type
User.company
A disadvantage is that it may, later, be desirable o have a steering field in object tables, which can be used to select which classification fields should be enabled and what workflow type should be applied to the object
Decision:
- Remove all classification-like fields from the main table
Do not implement a steering field for the first release
Using 'Distinct' in Search SQL (Status: Open)
Issue:
If documents/revisions/tasks are sorted by a classification class, in which an object has more than one classification, then the object appears on the list more than once if we do not use the DISTINCT SQL keyword. E.g.:
SELECT DISTINCT revisions.* FROM revisions INNER JOIN ...
But if we are using the DISTINCT SQL keyword than the sorting doesn't seems to be correct, because the sorting is effective after the distinct filtering.
Suggested implementation:
We should NOT use the DISTINCT SQL keyword and should probably display a warning if potentially some records are displayed many times
- The warning could be, e.g.: "WARNING: Revisions with more than one Location value will appear more than one time in the list"
Sorting Lists by Classification Code and Value (Status: Solved)
Issue:
- Currently is it not possible to sort by classification values because the classification values can be in different fields.
The values in object_classification fields are used for sorting only if the classification is a so called zero level (top-level) classification.
Suggested implementation:
- Use similar sorting with the appropriate (which occurs in a classification of the class) sort fields 'coalesced':
ORDER BY `cl_s1`.`code` ASC, coalesce(`oc_s1`.`min_int`, `oc_s1`.`min_float`)
Specifying Selection Predicates on Searching by Classification (Status: Decided)
Issue:
- Currently searching for Classifications is only a simple select list, it is not possible to use any of the following predicates
equals
not equals
in
not in
is present
is blank
The text classification value is a simple contains search.
- Should we implement this predicate selects? This is likely to be time consuming.
Decision:
- Leave this as-is for now and re-evaluate later based on customer feedback
Classification Sorting is Always Behind Other Field Sorting (Status: Open)
Issue:
- It is not possible to use classification sorting and after it other sorting.
This is a limitation of the ransack gem
- Changing the ransack gem is likely to be difficult and time consuming
Decision:
- Leave this as-is for now and re-evaluate later based on customer feedback
Back/Cancel Buttons (Status: Decided)
Issue:
The current screens inconsistently make use of Back links, and Cancel buttons
- A unified coding is standard is required. The following aspects should be considered:
The same screen can be called from different places, and there is no universal method to determine the correct Back path
There is generally no difference between the function of the Back link and Cancel button on edit and update screens
A JavaScript-based back function cannot be used on edit and update screens, because these screens mare have been re-rendered due to a validation error. A JavaScript (browser) back would simply cause the form to be re-submitted
Suggested Implementation:
Screens should not have Back links.
- Since the V2 system is REST based, the user can simply use the browser's back button instead (which is what it's for!)
- Screens with an input form should have a cancel button.
- The cancel button should return to a pre-defined (and fixed) path, based on the data element. There are two cases:
- Editing existing records: Return to the redord's detail screen or list, as appropriate
- Creating a new record:
- If the record can only be created from once place, such as adding an addition element to an existing record:
- Go to the record's detail screen or list of records
- Otherwise go to the home page
- If the record can only be created from once place, such as adding an addition element to an existing record:
- The cancel button should return to a pre-defined (and fixed) path, based on the data element. There are two cases:
Decision:
- Implement the suggested implementation
Full Path in the Classification Select Lists (Status: Open)
Issue:
It is not easy to see in Edit Classification's classification select list which classification is about, if some sub level have the same name.
- The tree is seen if the select list is opened.
Suggested Implementation:
- The select list could contain the full path. Disadvantage: the select lists will be very wide.
- The code could be displayed in the front of the name and the code should be unique at least in classification class.
Opening/Closing Blocks on the GUI (Status: implemented)
Issue:
- What would be the best solution? Save the open/close block status on id base or not?
Suggested Implementation:
Generally the name in HTML tag data-container is used with a prefix as cookie name for saving the status.
Basically the open/close block status will be saved not on id base, e.g. the Identification block on the document detail screen will be opened in the same manner for all documents. This is provided by the setting Settings.SXS.Application.OCC.NameWithId = false
It is possible to force to save the status the id in the HTML: data-save-mode="with-id". This setting is used currently on document detail for the individual revisions and on task detail on the individual notes.
It is possible to disable saving the status in the HTML: data-save-mode="false". This is used currently on list screens in add to basket block.
The prefix of the cookie name and the expire time of the cookie are set in: Settings.SXS.Application.OCC.Prefix and Expire, and currently set to "v2_occ_" and 7 days respectively.
MAPS Issues
Infrastructure Issues
Vagrant File Share Performance (Status: Open)
There are potential performance issues with native Vagrant share_folder
- Vagrant document suggests using NFS shares instead
- We should do performance tests of document access and backups
Vagrant share_folder suffers from a VirtualBox bug
Work around is to set Apache config option: EnableSendFile off
- Vagrant NFS share bug
- Symptom: During 'vagrant up' the following is displayed:
- /etc/init.d/nfs-kernel-server: command not found
The problem is that a Ubuntu NFS restart command is being run on the CentOS host
- Symptom: During 'vagrant up' the following is displayed: