orange-cloudfoundry / pivotaltrackermirror

Mirror a pivotal tracker project to an another tracker
Apache License 2.0
1 stars 2 forks source link

Support db data loss recovery: avoid creating duplicate stories on 1st indexation #22

Open gberche-orange opened 8 years ago

gberche-orange commented 8 years ago

Currently, as an optimization, a new mirroring jobs will trigger creation of new stories, regardless of existence of mirrored issues, leading to duplicated issues in case of data loss.

The DB currently only contains the data submitted by end users, see https://github.com/orange-cloudfoundry/pivotaltrackermirror/blob/32ee4606067a29152cfe474d5ab3b77f52488e40/src/main/resources/db/changelog/db.changelog-master.yaml#L1-L40

In order to cover the case where the db is lost, the UI would be accepting a new field "scan-for-existing-mirrored-stories" that could be checked when a new job is created but points to a repo already containing mirrored stories.