aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
AgeCommit message (Collapse)Author
2017-09-06Comment call for deleted class ReportConcernLuc Donnet
2017-09-05Model ComplianceCheckBlockXinhui
Refs #4387
2017-09-05Comment call for deleted class ReportConcernLuc Donnet
2017-09-05Model ComplianceCheckSetXinhui
Refs #4386
2017-09-05Model ComplianceControlXinhui
Refs #4385
2017-09-05Model ComplianceControlBlockXinhui
Refs #4384
2017-09-05Model ComplianceControlSetXinhui
Refs #4383
2017-09-05Clean up compliance checks existing code Refs #4389 @1Luc Donnet
2017-09-04Fix import status table views and first version for import_messages Refs #4527Luc Donnet
2017-09-04Delete AAM in import_resource model Refs #4527Luc Donnet
2017-09-04Merge branch 'master' of github.com:AF83/stif-boivLuc Donnet
2017-09-04Update workbench_import, netex_import and import_resources views Refs #4256 ↵Luc Donnet
#4257 #4258
2017-09-04add some change for the Referential#new_from to only have a line collection ↵cedricnjanga
regarding the functional scope of the current organozation
2017-09-01Prefix local_id with IBOOXinhui
Refs #4237
2017-08-31Merge branch 'master' into stif_netex_objectidXinhui
2017-08-31Fix features spec connection_linksXinhui
2017-08-31Default local_idXinhui
2017-08-31Refactoring objectid support & specXinhui
2017-08-31Fix message_attributs undefined methodXinhui
2017-08-31Add warning status to import Refs #4258Luc Donnet
2017-08-31Edit local_id with referential id & rails idXinhui
2017-08-31Remove model WorkbenchObjectIdentifierXinhui
2017-08-30Merge branch 'master' of github.com:AF83/stif-boivLuc Donnet
2017-08-30Update show data for import Refs #4258Luc Donnet
2017-08-30Merge pull request #58 from af83/import-model--clean-up-code-and-add-specsteddywing
Import model clean up code and add specs
2017-08-30Don't launch_java_import if NetexImport#status is finished. Refs #4338Alban Peignier
2017-08-30Import#child_change: Remove `child` argumentTeddy Wing
It isn't used any more so get rid of it. I had forgotten to remove the argument from the place it was actually called in the code when I did this previously in 61817b2e7828455021bcec66e2d6da70f879e1c4. Actually, Alban hadn't modified the method signature in the code he gave me, I shouldn't have committed that change as him, my bad. The argument was added back in because it caused `#notify_parent` to fail. Update that method so it makes the correct method call.
2017-08-29Make ready children referentials when Import is finalizedAlban Peignier
2017-08-29Fixes Import#child_change argumentAlban Peignier
2017-08-29Refs #3367 Change Time table overlap querycedricnjanga
2017-08-29Import#update_status: Clean up status assignmentTeddy Wing
Clean up this section a tiny bit. Should function the same way as before.
2017-08-29Import#update_status: Update `ended_at` when import has finished statusTeddy Wing
Previously we were only updating the `ended_at` field when the import had a 'successful' status. But there are other statuses that indicate the import finished, and the `ended_at` field should be updated in these cases also. Committing what I have now which seems to work but I didn't write specs for it because it was a pain to test (what with creating a child, etc.). The `#update_status` method should be refactored to make testing the `ended_at` update easier. This needs to be committed without specs now because I'm off to go to a client meeting and this work/branch is blocking QA of imports both internally and externally. So I guess doing things right comes later. That is to say, probably a lot later. Who knows.
2017-08-29Import: Add TODOsTeddy Wing
A bunch of things that need to be written to get this in proper working order.
2017-08-29Import: Remove `#ready?`Teddy Wing
This method is no longer used, now that we have Alban's `#update_status` method. Originally this was supposed to be used to determine if the import was finished or not. Now, the parent import status field update doesn't depend on it, and we can use the `Referential#ready` field to determine whether or not to display the import in the interface.
2017-08-28Import#child_change: Update ready status of referentialAlban Peignier
After handling a status update of the parent import, if the parent import finished, we should update its referential to `ready: true` so that the referential actually gets displayed on the page.
2017-08-28Import#child_change: Move status update logic into a new methodAlban Peignier
Instead of just looking at the given child, the parent import status is now determined by checking all children and assigning a value based on their status. This also updates the `current_step` (which was previously handled by the `WorkbenchImportWorker`, remind me to remove it from where), and the `ended_at` time. I think `ended_at` should probably be updated in both successful and failed cases. Will have to make that update.
2017-08-28Refs #4255: updating overheaded component styles, adding children method for ↵jpl
import
2017-08-28Merge branch '4273_http_service_broken'Alban Peignier
2017-08-27Make NetexImport#parent mandatory. Refs #4273Alban Peignier
2017-08-27Call launch_java_import only when NetexImport is created. Refs #4273Alban Peignier
2017-08-27Launch WorkbenchImportWorker when WorkbenchImport is created. Refs #4273Alban Peignier
2017-08-27Add Import#messages to manage ImportMessages. Refs #4273Alban Peignier
2017-08-27Import#referential is mandatory only for NetexImport. Refs #4273Alban Peignier
2017-08-25ErrorFormat: Add TODO to move this fileTeddy Wing
Robert recommended that this file should not live in concerns. Move it somewhere else (maybe lib/ ?).
2017-08-25ErrorFormat: Change collection structureTeddy Wing
These tests were failing: 1) NetexImport POST netex_imports with correct credentials and incorrect request behaves like illegal attributes missing file does not succeed Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty TypeError: no implicit conversion of String into Integer Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:90 # ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]' # ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>' # -e:1:in `<main>' 2) NetexImport POST netex_imports with correct credentials and incorrect request name already taken behaves like illegal attributes missing name does not succeed Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty TypeError: no implicit conversion of String into Integer Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:96 # ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]' # ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>' # -e:1:in `<main>' The problem was caused by the fact that the error messages come back from `ErrorFormat` as an array of hashes, which contain a single key corresponding to the invalid field. Instead, the error messages should be returned as a single hash with a bunch of keys corresponding to the invalid fields. This change gets the above tests to pass.
2017-08-25ErrorFormat: Tidy up whitespaceTeddy Wing
2017-08-25NetexImport: Run Java import API call in a threadTeddy Wing
While testing imports with Alban, we saw that this request was blocking, not asynchronous. The Java application apparently didn't figure that it should close HTTP connections before handling a long-running import job. In order to get around that on the Rails appliation side, Alban suggested putting the request in a thread. Works like a charm, and we respond in a sensible amount of time.
2017-08-23Model Import belong_to referential is no longer requiredXinhui
Refs #4280
2017-08-22Refs: #4273@3h;Robert
Debugging Java Integration (ZipService -> HTTPService -> Object Creation) - Created an ErrorFormat concern to see what went wrong in the HTTP call as so many things can go wrong due to: * Timeout Issues * Illegal database setup or cleaning before tests
2017-08-21Refs #4246 Fix combinaitions to only consider effective days for the two ttcedricnjanga