aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
AgeCommit message (Collapse)Author
2017-11-17Refs: #4283@16h;Robert
- Implements the view Missing: - Spex failing (xpath navigation inside the display blocks is still faulty) - Links to compliance_checks#show do not work (actually not this page's problem)
2017-11-17Merge branch '4516_cleanup_rule_parameter_set'Xinhui
2017-11-17Merge pull request #116 from ↵Luc Donnet
af83/4962-when-WorkbenchImport-is-deleted-also-delete-associated-Referential-if-ready-false 4962 when workbench import is deleted also delete associated referential if ready false
2017-11-14NetexImport: Use `unless` instead of `if !`Teddy Wing
Suggestion from Robert. Refs #4962
2017-11-14Remove rule parameter set from modelsXinhui
Refs #4516
2017-11-14Remove model rule_parameter_setXinhui
Refs #4516
2017-11-13NetexImport: Destroy referential on destroy if ready:falseTeddy Wing
If the `NetexImport`'s associated `Referential` has `ready: false`, when the `NetexImport` is destroyed, also destroy the `Referential`. This prevents a case where users get an invalid `Referential` as a result of an import, but because of the `ready: false`, it doesn't display on the website, so they can't see what the problem is. Refs #4962
2017-11-13ComplianceCheckSet#update_status: Return `true` if no update happenedTeddy Wing
Return `true` from this method by default. If the `#update` call fails, then it will return `false`, but in all other cases, we should return `true`. That way, when the `Api::V1::ComplianceCheckSetsController#validated` endpoint is called, it will respond with the `ComplianceCheckSet` object instead of: {"status":"error","messages":[]} with no error messages. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Handle resources with "IGNORED" statusTeddy Wing
If any associated resources have the "IGNORED" status, this shouldn't affect the outcome of a "successful" status. Allow the `ComplianceCheckSet` to be "successful" even if some `Resource`s are "IGNORED". Refs #4757
2017-11-13ComplianceCheckSet: Rename to `all_statuses_ok?`Teddy Wing
Another suggestion from Robert, since this method returns a boolean, maybe its name should end with a question mark. Refs #4757
2017-11-13ComplianceCheckSet: Rename to `all_statuses_ok`Teddy Wing
Suggestion from Robert to have a simpler name. I had just written it the way it sounded in my head when I wrote the method. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Return result of `#update`Teddy Wing
We should return the result of the `ActiveRecord` `#update` call, so that we can determine if there was an error saving the `ComplianceCheckSet` record. Refs #4757
2017-11-13Revert "ComplianceCheckSet#update_status: Should return a boolean"Teddy Wing
This reverts commit b7477e28f90c961079c7b12c4992071cbc11b2d6. This logic isn't right. We should return true/false based on the result of `update`, as in, whether the value was able to be updated, instead of on the contents of the status.
2017-11-13ComplianceCheckSet#update_status: Should return a booleanTeddy Wing
Ensure that `#update_status` always returns a boolean value. We'll be using this to determine whether the updated status was 'successful' or not. Hmmm. Wait. That's not right. We want to return true from the update, we don't care about the status. The error case should be when the `update` fails. Darn. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Only update 'successful' at the endTeddy Wing
Previously we were updating to a 'successful' status prematurely, at the first encounter with a successful `ComplianceCheckResource`. Here, we wait until we've looked at all associated `ComplianceCheckResource`s before setting 'successful'. Only if all associated `ComplianceCheckResource`s are successful do we set this status on the `ComplianceCheckSet`. Refs #4757
2017-11-13ComplianceCheckSet#update_status: First incomplete versionTeddy Wing
Fill in the `#update_status` method. It should update the status of the `ComplianceCheckSet` based on the status of its child `ComplianceCheckResource`s. This version doesn't work because it doesn't wait until the end of the loop to update the status to 'successful'. But it's the right logic for the 'failed' and 'warning' cases. Refs #4757
2017-11-13ComplianceCheckSet#update_status: Add spec for successful childrenTeddy Wing
Initial spec that checks the correct status field change when all `ComplianceCheckResource`s are successful. Refs #4757
2017-11-13Import: Destroy associated `Referential` on destroy if ready:falseTeddy Wing
If the `Import`'s associated `Referential` has `ready: false`, destroy that `Referential` when the import is destroyed. Aaand looking back at the task it turns out that's not what I was supposed to do. Right, it does seem a little weird in retrospect. Instead we want to delete the `Referential`s of child imports. Refs #4962
2017-11-09Merge branch '4944_remove_route_section_code'Xinhui
2017-11-09Remove call to route_section related method4944_remove_route_section_codeXinhui
2017-11-09Refs #4932 Change route duplication to redrect to routes#indexcedricnjanga
2017-11-09Remove model route_sectionsXinhui
2017-11-06Fix on ImportMessage#criticity enumerationcedricnjanga
2017-11-06Refs #4859 Change ImportMessage#criticity type to stringcedricnjanga
2017-11-06Merge pull request #109 from af83/4802-referential-model-normalisationteddywing
4802 referential model normalisation
2017-11-06Refs #4788 Add predicate and perequisite for ComplianceControlcedricnjanga
2017-11-06Refs #4813 Add funicular in transport mode enumerationcedricnjanga
2017-11-03 Refs:#4802@0.5h;Robert
CodeReview: - Exchange fr and en translation files for referential_suites - Consistent usage of `jeu de donées` and `espace de travail` dans les *fr.yml Fixes: #4802@0.2h; Replaying former work. To identify spec regression Step 3: Added validation of reference_suite#new/current Made all specs pass
2017-11-02 Refs: #4802@2h; Replaying former work. To identify spec regressionRobert
Step 2: Added validation of reference->workbench->organisation consistency Made all specs pass Chased bug #4826
2017-11-01Refs: #4802@6h; Replaying former work. To identify spec regressionRobert
Step 1: config/locales
2017-10-31Refs: #4774@2h; Debugging feature specs, added ↵Robert
ComplianceControl.subclass_patterns [amend me] [skip-ci]
2017-10-31Refs: #4774@3h;Robert
Ransack filter view implemented
2017-10-31Fix locales problem for wrong file extension in import Refs #4816Luc Donnet
2017-10-26Refs #4637 Add resolve status to Import.finished_statusescedricnjanga
2017-10-24Simplify extension file validationcedricnjanga
2017-10-23Refs #4762 Add file extension checking before importing (standard app and api)cedricnjanga
2017-10-18Fix spec validation failed on contriance control sti subclassesXinhui
2017-10-17Compliance Control set min level of criticityXinhui
Refs #4730
2017-10-17Change routing constaint zone control default codescedricnjanga
2017-10-16Uncomment presence validation on generic attribute control Refs #4728Luc Donnet
2017-10-16Merge branch 'master' of github.com:af83/stif-boivcedricnjanga
2017-10-16Refs #4722 Comlpiance Control translationscedricnjanga
2017-10-16Fix uniqueness for code in compliance_control_set Refs #4731Luc Donnet
2017-10-16Refs: #4720@1.3h;Robert
Validation implemented for min_max_values with correct I18n'd error messages Applied to: VehicleJourneyControl::Speed & GenericAttributeControl::MinMax
2017-10-15Fix titles on different pages, Translate compliance_control_block in edit of ↵Luc Donnet
compliance_control
2017-10-14Fix translations for compliance_control type translation, compliance_control ↵Luc Donnet
validation, compliance_control module
2017-10-13Refs: #4709@0.2h; Fixing illegal value `info` dans ComplianceCheck.criticity4709-compliance-check-criticity-as-stringRobert
2017-10-12Fixes: #4709@0.15h;Robert
Nullified ComplianceCheck STI column speced and implemented via `self.inheritance_column = nil`
2017-10-12Refs: #4709@0.75h;Robert
DONE: - Copied all node atts for ComplianceChecks - Migration of CompliancCheck#criticity int -> string TODO: - Check what to do with attribute ComplianceCheck#type
2017-10-11update list of transport_modes and sub_modes, fix translate for ↵4706-mofify_sub/transport_modesGuillaume
transport_modes helper Refs #4706