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

merge activity records #245

Closed
dhiltonp opened this issue Apr 26, 2015 · 9 comments
Closed

merge activity records #245

dhiltonp opened this issue Apr 26, 2015 · 9 comments

Comments

@dhiltonp
Copy link
Contributor

It would be nice to have automatic facilities for merging 2 activities, for cases where either via accidental stop or crash an activity has had to be restarted.

@jonasoreland
Copy link
Owner

agree!

On Sun, Apr 26, 2015 at 9:47 PM, David Hilton [email protected]
wrote:

It would be nice to have automatic facilities for merging 2 activities,
for cases where either via accidental stop or crash an activity has had to
be restarted.


Reply to this email directly or view it on GitHub
#245.

@paradix
Copy link
Contributor

paradix commented Apr 27, 2015

would this be possible by simply adding a the ID of the previous or next activity and handling this at presentation layer?

@jonasoreland
Copy link
Owner

i think an simple update would work.
something like (roughly):

begin;
update location set activity_id = <new_activity_id>, lap = lap + (max lap
new activity_id) where activity_id = <old_activity_id>;
update lap set activity_id = <new_activity_id>, lap = lap + (max lap new
activity_id) where activity_id = <old_activity_id>;
update activity set total_time=total_time + (time old acitivity),
total_distance=(...) ... where activity_id = <new_activity_id>;
delete from activity where activity_id = <old_activity_id>;
commit;

I can do the SQL...but...we need a GUI to select which activities to
merge...

/Jonas

On Mon, Apr 27, 2015 at 10:56 AM, paradix [email protected] wrote:

would this be possible by simply adding a the ID of the previous or next
activity and handling this at presentation layer?


Reply to this email directly or view it on GitHub
#245 (comment)
.

@paradix
Copy link
Contributor

paradix commented Apr 27, 2015

Would be nice to make some plausibility checks before the user ruins his history.
i.e.

  • checking start time of next against end time of previous activity
  • checking sport types
  • ...?

@jonasoreland
Copy link
Owner

yes,

On Mon, Apr 27, 2015 at 12:01 PM, paradix [email protected] wrote:

Would be nice to make some plausibility checks before the user ruins his
history.
i.e.

  • checking start time of next against end time of previous activity
  • checking sport types
  • ...?


Reply to this email directly or view it on GitHub
#245 (comment)
.

@paradix
Copy link
Contributor

paradix commented Apr 27, 2015

I could try to do this, but at this point of the week I'm swamped with work.

@gerhardol
Copy link
Collaborator

#287 implements merging (needs some rework though). Closing issue

@dhiltonp
Copy link
Contributor Author

dhiltonp commented Aug 9, 2017

It's weird to close this as the issue isn't completed.

@gerhardol
Copy link
Collaborator

The PR is open (there were 150 open issues before so the relevant issues were not found..)

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

4 participants