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

Sort submissions DESC #16

Open
jakubmirejovsky opened this issue Oct 21, 2021 · 3 comments
Open

Sort submissions DESC #16

jakubmirejovsky opened this issue Oct 21, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@jakubmirejovsky
Copy link

Did anyone encounter a request to sort data DESC? Sometime it makes more sense.
Any suggestions before I start implementing it?

@jakubmirejovsky jakubmirejovsky added the enhancement New feature or request label Oct 21, 2021
@abea
Copy link
Contributor

abea commented Oct 21, 2021

I'm not sure what you mean. Sorting in the Google spreadsheet? I don't recall that this module has any effect on that. It simply adds a new row in the sheet.

@jakubmirejovsky
Copy link
Author

I'm not sure what you mean. Sorting in the Google spreadsheet? I don't recall that this module has any effect on that. It simply adds a new row in the sheet.

Exactly - it only adds a new row below the bottom of the content range. But - we've got a request that the client wants to see new submissions first.
So, I was thinking prepending every new submission, somehow. But I don't want to reinvent the wheel. Wasn't this already implemented somewhere? Something like this: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#insertrangerequest

@abea
Copy link
Contributor

abea commented Oct 21, 2021

Got it. This could be a new feature, moving the appendSubmission function into a method owned by the module (self.insertRow or something like that). That method could then allow simple appending as it does now or some other method of insertion like you're describing. That would also make it easy to override if someone wanted to add or adjust the processes in project code.

I think we'd be happy to have this kind of contribution as long as it's backwards compatible. Since sendToGoogle is one big function now (not ideal), replacing part of it with an extracted module method should not be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants