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

Cannot close a task #14

Closed
dotnetwise opened this issue Mar 5, 2014 · 28 comments
Closed

Cannot close a task #14

dotnetwise opened this issue Mar 5, 2014 · 28 comments

Comments

@dotnetwise
Copy link

I have tried all, Fix, Fixes, Close, Closes #ID etc. and none of them marks as complete a task, whether it has subtasks, it is a subtask or is a simple task.

The functionality seems broken in the latest ASANA API and this github-asana version

@bendrucker
Copy link
Contributor

@dotnetwise Seeing the same issue. Overloaded until next week but I'll investigate and write up a PR if there's a fix.

@cendrizzi
Copy link

I just tried using this and was wondering what I was doing wrong. Nice to see someone already noticed this.

@dotnetwise
Copy link
Author

Any progress @bendrucker ?

@bendrucker
Copy link
Contributor

Not yet but I'll take a crack this morning

@bendrucker
Copy link
Contributor

Did a little poking around and there's no good reason this should be failing. I've put in an email to the API dev team to see if we can diagnose the issue. I'm debating rewriting this anyway on top of a REST client for the API.

@matinm
Copy link

matinm commented Apr 2, 2014

I'm still seeing this issue too. Is there any way I can help fix this @bendrucker ?

@bendrucker
Copy link
Contributor

@matinm Same. I emailed Asana API support and they blamed it on the API outage that happened ~2 weeks ago. Just responded to them saying that it's still broken.

@agnoster
Copy link

agnoster commented Apr 5, 2014

Asana dev here - what seems to be the problem, officer? :-)

Just to be clear:

  • "Fix" triggers nothing, or it posts a comment but doesn't close?
  • Do "see" and "unbreak" both work correctly?

I note there isn't any error handling in the code - without knowing what the server response is it's hard to say what's going wrong unfortunately. We're using the API to close tasks ourselves and it's working fine, so I'd like to bisect the issue and find out where it's all going so horribly, horribly wrong.

@matinm
Copy link

matinm commented Apr 5, 2014

@agnoster The behavior I'm personally seeing is that a "fix" posts a comment on the corresponding task but doesn't close it.

@agnoster
Copy link

agnoster commented Apr 5, 2014

Okay, that looks - and I'm not super confident - but I think the code suggests that the plugin does precisely one of three things (complete, uncomplete, or post comment), and the branch depends on the "verb" it detects. This would suggest that the plugin is detecting the wrong verb instead of there being a problem with the plugin communicating with the Asana API.

Am I reading it wrong?

@bendrucker
Copy link
Contributor

@agnoster The real mystery here is that this plugin has not been updated since this issue started. I agree that the lack of error handling is less than ideal. I'd wager that the vast majority of users have this set up through Github's post-receive hook dashboard as I do. I haven't tested whether running the code in this repo directly works. Who runs the public service? Github? You guys?

@agnoster
Copy link

agnoster commented Apr 7, 2014

I think Github sends the post-receive hook? Can you confirm that what @matinm is observing is consistent with the comment not having (or not being recognized as having) the correct "fix" verb? After all, it's clearly getting through, and then posting a comment. That seems, if I'm reading the code at least, to lead to the conclusion this is not an API issue at any rate.

@bendrucker
Copy link
Contributor

Correct — the comment is indeed posted so it seems to be an issue with the verb logic. Part of the confusion here is that the library itself has not changed recently which led us to suspect a breaking API change. If that's not the case, that means the deployed service that Github is not the same as the master here.

@thorning
Copy link

@agnoster I believe the code will always send a comment with the commit message, and if the fix verb is there also send a close request.
This means it could be an issue with sending comment+close requests on the same task in quick succession.

I use the github hook, and tested that if will comment on two tasks if two ids are present, meaning it can send multiple requests.

@bendrucker
Copy link
Contributor

@agnoster Just did some more thorough testing. This issue is not present in this repo. I ran it locally and tunneled a hook with ngrok. All systems go. There seem to be significant differences between this repo and what's running as the GH service, including the wording of the comments.

Also, this repo isn't even functional. There's a critical mistake here: https://github.com/jamieforrest/github-asana/blob/master/lib/github-asana.js#L9

For me there's no req.body.payload when using the bodyParser middleware. It's just req.body.

Any chance you know the right person at Github to ping about this? If not I'll email their general support address since clearly this issue is on their end.

@jamieforrest
Copy link
Owner

@bendrucker Did Asana change their API? There definitely was a payload property when I created this (although it was almost 2 years ago).

@agnoster
Copy link

I don't know the "right" person to ping about this, but maybe there's a chance @neverett does?

The Asana integration is featured pretty prominently on https://github.com/integrations so I imagine there's at least some interest in making sure it's using the right/latest code?

@agnoster
Copy link

payload has nothing to do with the Asana API, that's... maybe an express thing?

The Asana format for marking tasks complete has not changed since the API existed, nor has the overall structure of the API. We've added new endpoints and new properties, but we maintain backwards compatibility to a fault. Someday there may be a backward-compat-breaking v2, but that's still a ways off if it happens.

@jamieforrest
Copy link
Owner

@agnoster Yes you're right. Sorry, it's been a while since I looked at this.

@jamieforrest
Copy link
Owner

@bendrucker Feel free to submit a PR to fix the payload issue.

@bendrucker
Copy link
Contributor

Yup request is express — that's the hook coming from GH. Will send a PR for fixing that. Not sure how it broke.

bendrucker added a commit to bendrucker/github-asana that referenced this issue Apr 14, 2014
@bendrucker
Copy link
Contributor

The built in Github/Asana integration is here and only supports comments. If I have time I'll send a PR over there. Otherwise I think I've closed all the major issues here in recent PRs.

@dotnetwise
Copy link
Author

So where are we with this?

@bendrucker
Copy link
Contributor

I fixed the only critical issue in #16 and verified locally that everything was working as expected. Tests would certainly be of help here. I may also consider writing a wrapper eventually and some functionality could be abstracted away into that. Unlikely that I'll do that in the near future though.

When you go to file a support ticket with Github regarding Asana integration they recommend contacting Jamie for help. That's pretty misleading as Github's native Asana integration is in-house and in Ruby, just like all built in service integrations.

@jamieforrest This can be closed

@lorensr
Copy link

lorensr commented Jun 9, 2015

This is still a problem for me with the current Github integration:

image

I take it that is not this repo code – would be good to note that at the top of the readme.

@bendrucker: a PR to the Github version of the integration would be nice :)

@trueter
Copy link

trueter commented Jun 11, 2015

+1 @lorensr
I'm also using the Github Asana Service.
Commits are recognized but tasks don't get checked. Tried commit title and body with "Closes".

@mada41
Copy link

mada41 commented Aug 24, 2015

any update on this issue?

@frangulyan
Copy link

Same for me. Commit comment is "Fixed #XXXXX", comment is attached to the asana task but the task is not marked as completed. Any update or settings need to be tweaked? New to asana...

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

No branches or pull requests