Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration of the outings associated to climbing sites #351

Closed
asaunier opened this issue Jul 27, 2016 · 20 comments
Closed

Migration of the outings associated to climbing sites #351

asaunier opened this issue Jul 27, 2016 · 20 comments

Comments

@asaunier
Copy link
Member

In v5, it is possible to create an outing from a "climbing site" page => no route is associated to the outing. See for instance: http://www.camptocamp.org/outings/538339/fr/gaillands (associated to the climbing site http://www.camptocamp.org/sites/102326/fr/gaillands)

In v6:

@tsauerwein do you think it would be possible when migrating such outings (not associated to a route but to a climbing site) to create a basic route (if not already existing) which would be named the same way than the climbing_site waypoint and to associate it between the WP and the outing?

(Of course we could keep the current way those outings are migrated if the above solution is too complicated - I didn't realize until now it was possible- but that would be a bit confusing and not consistent to have those old outings still associated to the climbing site waypoints.)

@tsauerwein
Copy link
Member

Makes sense.

@fjacon fjacon added this to the Alpha 3 milestone Aug 3, 2016
@fjacon fjacon assigned tsauerwein and unassigned fjacon Aug 3, 2016
@fjacon fjacon modified the milestones: Beta, Alpha 3 Aug 3, 2016
@asaunier
Copy link
Member Author

This topic should be considered quite soon, it's rather important.

@asaunier asaunier modified the milestones: Go Live, Beta Nov 2, 2016
@tsauerwein
Copy link
Member

tsauerwein commented Nov 7, 2016

The following would have to be done:

For all climbing sites (waypoint type = climbing_outdoor or climbing_indoor) that are associated to outings, create fake routes:

  • These fake routes have the same geometry as the climbing site, the same locales (only the title is set) and activities is set to rock_climbing. All other fields are empty.
  • Create version and history entries for the fake routes.
  • Create an association between the fake route and the climbing site.
  • Create an association log entry for this association.
  • Create an association between the new fake routes and the outings that are associated to climbing sites.
  • Create an association log for these associations.
  • Remove all waypoint-outing associations.
  • Remove association log entries for all waypoint-outing associations.

[edited]

@asaunier
Copy link
Member Author

asaunier commented Nov 8, 2016

Makes sense. Thanks for the analysis!

@stef74 stef74 added the blocking label Nov 9, 2016
@stef74
Copy link

stef74 commented Nov 18, 2016

@asaunier @tsauerwein when do you plan ?

@tsauerwein
Copy link
Member

I was planning to tackle this today.

@asaunier
Copy link
Member Author

@stef74 @fbunoz what name do you recommend for the fake routes?

@tsauerwein has observed that since the climbing site will be set as the main waypoint, its name will be displayed as prefix in the route name, so it's not relevant to reuse the site name as the fake route name.
He has suggested to use "dummy route" for instance. Would it fit? Do you have a better idea?

@tsauerwein
Copy link
Member

In the description we could also show a link that points to an article that explains the idea behind "dummy/fake" routes for climbing sites. It would be up to the association to create such article.

@asaunier
Copy link
Member Author

It would be up to the association to create such article.

If such an article is created, it should be added in v5 because the document_id must be available before running the migration.

@tsauerwein
Copy link
Member

Should the created dummy/fake route be protected, so that only moderators can modify it?

@fbunoz
Copy link
Contributor

fbunoz commented Nov 18, 2016

For all climbing sites (waypoint type = climbing_outdoor or climbing_indoor) that are associated to outings that are not associated to a route

No, all outings associated with a climbing site must be treated. In V5, we can associate an outing to 1 or several routes AND to 1 or several sites : http://www.camptocamp.org/outings/list/routes/+/sites/+
During the migration, these outing must keep all there associations.
I think it is not difficult to respect this rule ?

It would be up to the association to create such article.

Yes : http://www.camptocamp.org/articles/822764/fr/saisir-une-sortie-couenne-sur-la-v6

Should the created dummy/fake route be protected, so that only moderators can modify it?
Yes.
In V5, a moderator can't modify a protected doc, except to unprotect it, but it is better to allow a moderator to modifiy a doc any time.

what name do you recommend for the fake routes?

undefined ? :)
I don't know, but the asociation must decide before the migration.

@asaunier
Copy link
Member Author

I don't know, but the asociation must decide before the migration

Not only before the migration, but before this issue is closed = ASAP = before monday, thanks :)

@asaunier
Copy link
Member Author

@tsauerwein What about the outings that are associated to several climbing sites? For instance http://www.camptocamp.org/outings/538678/fr/j3-a-fontainebleau-trois-pignons-circuit-jaune-pd-du-rocher-des-potets-puis-petit-tour-au-91-1
Will this outing be associated to 2 fake routes instead?

@tsauerwein
Copy link
Member

No, all outings associated with a climbing site must be treated. In V5, we can associate an outing to 1 or several routes AND to 1 or several sites : http://www.camptocamp.org/outings/list/routes/+/sites/+
During the migration, these outing must keep all there associations.
I think it is not difficult to respect this rule ?

Ok, no problem. That makes the query even easier.

What about the outings that are associated to several climbing sites? For instance http://www.camptocamp.org/outings/538678/fr/j3-a-fontainebleau-trois-pignons-circuit-jaune-pd-du-rocher-des-potets-puis-petit-tour-au-91-1
Will this outing be associated to 2 fake routes instead?

Yes. That would be in line with what @fbunoz said above ("During the migration, these outings must keep all their associations").

@fbunoz
Copy link
Contributor

fbunoz commented Nov 20, 2016

The feedback from the association about the dummy route :

  • Lang : FR.
  • Name (FR) : "Accès pédestre".
  • Activity : "hiking".
  • Max altitude : climbing site altitude.
  • Route type : return trip.
  • Duration : 1 day.
  • Quality : empty.
  • The climbing site is associated as main WP.

@stef74
Copy link

stef74 commented Nov 27, 2016

@shortoland @loicperrin @fbunoz please test

@fbunoz
Copy link
Contributor

fbunoz commented Nov 28, 2016

I verified that all rock climbing outings are georeferenced (using the carto and comparing with not using the carto, it is not friendly as there is a bug on doc count when with zoom on whole world).
It is not enough to close this issue.

@asaunier
Copy link
Member Author

there is a bug on doc count when with zoom on whole world

What do you mean? Is there an issue describing it?

It is not enough to close this issue.

Could you please precise what is actually preventing from closing the issue?

@fbunoz
Copy link
Contributor

fbunoz commented Nov 28, 2016

Is there an issue describing it?

Yes : #538

Could you please precise what is actually preventing from closing the issue?

We must check that the outings are associated to the dummy route of the right climbing site, and that an outing associated to a V5 route and a V5 site is migrated correctly, and another things.

@stef74 stef74 closed this as completed Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants