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

task.rb#add_project() and #add_subtask() broken parameters #109

Open
apiology opened this issue Jul 28, 2021 · 0 comments · May be fixed by #113
Open

task.rb#add_project() and #add_subtask() broken parameters #109

apiology opened this issue Jul 28, 2021 · 0 comments · May be fixed by #113

Comments

@apiology
Copy link

The insert_after and insert_before parameters to task.rb#add_project() need to differentiate between the user not passing in a parameter and the user passing in nil.

Per the API documentation, at most one of insert_before, insert_after or section should be specified, but null is a valid value for insert_after/insert_before that has different semantics from simply not passing the parameter: https://developers.asana.com/docs/add-a-project-to-a-task (be sure the expand the 'data' parameter in the docs to see this detail)

A similar issue affects the 'parent' parameter in task.rb#set_parent()

These two situations hit a use case for me and I've had to apply this diff to be able to pass in nil to the insert_before/insert_after parameters:

https://github.com/Asana/ruby-asana/compare/master...apiology:insert_before_after?expand=1

I'd be happy to submit that as a PR, but perhaps the more correct fix is upstream in the code generation? Let me know what you think.

apiology added a commit to apiology/checkoff that referenced this issue Jul 30, 2021
Adds a CLI 'mv' subcommand, which supports adding projects to tasks within the same workspace and changing their sections for now.

Move over to get_tasks() in ruby-asana, as get_tasks_for_section() lacks completed_since support.

Use forked version of ruby-asana gem for development use, as ruby-asana is pending key bugfixes for checkoff:

See

* Asana/ruby-asana#109
* Asana/ruby-asana#110
@apiology apiology linked a pull request Aug 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant