Created
February 8, 2018 18:24
-
-
Save mgratch/1fbcad2a2b52e4f5dcc1d45cbaa44f7b to your computer and use it in GitHub Desktop.
Find the ID of the item you want to keep, select all above that. Useful if a project has hours spanning months and you only need this months hours.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Delete all items above a specific ID ... i.e. I import a project time from toggl | |
* which spans multiple months. I only want this months. So I find the first item I need to keep. | |
* All the items above should be deleted. | |
**/ | |
jQuery.each(jQuery('#2623').prevAll(), function(){ | |
jQuery(this).find(jQuery('.time_entry_deletion')).click(); | |
}) | |
/** | |
* Delete all items from a project | |
**/ | |
jQuery.each(jQuery('.time_entry_deletion'), function(){ | |
jQuery(this).click(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment