User-accessible way to get a task-id? - asana

I want to make a git hook that will automatically comment on an open issue in asana when someone makes a commit with a specially-formatted message. Something along the lines of:
asana task-id: Fix whatever
The main problem I'm having is I don't know an easy way of getting the task-id. The ids are quite long and the only place I see them being displayed in the user interface is in the URL when you click a task. This is a bit cumbersome and error prone when trying to copy it, and isn't obvious to the user.
Is there an easier way to comment on a task from a shell script (or git hook)?

Well, regardless of how you do it you'd definitely need the task ID (as you pointed out, it's in the URL). What we actually do internally is just paste a link to an Asana task - it contains the ID, identified it as an asana task, and is clickable in many views so you can jump right to the task it's talking about when viewing commit history. Very handy!
We then have what is essentially a commit hook look for https://app.asana.com/..., grab the task ID and post a new comment linking to the commit in our source control and the commit message.
Using URLs means the link goes both ways, which is incredibly convenient.

Related

Bitbucket daily personal log

I've been using Bitbucket for a week now. It seems like a capable platform. Personally in my development activities, I keep a daily "journal" of whatever I need to keep track of separately from any commits to the Git repo. It gives me a place to keep all my "thoughts and ideas" in one place.
Before I end a day's work, or I jot down what I last worked on and any thoughts I think I'll need on the following day. And before I begin each day's work, I just flip to the last page of my journal and it quickly brings me back up to speed of where I was at yesterday, no matter how little sleep I got. :-)
I see Bitbucket has "Comments", "Work Log", "History" and "Activity", but they seem to be tied only to user stories, todos and the like.
Does anyone know of a way where I can have something like a "Work Log" tied directly to my user account? I'm thinking I could use it for my personal "Journal".
Note: I'm using a locally installed Bitbucket server.
If you're using the online https://bitbucket.org (not specified in the question) rather than a hosted instance then you can do a couple of things.
1 Wiki
Create a repository which will act as your work log
Obviously if you want to keep notes with the same code base just enable the wiki for that repository. The question seemed to suggest you may want to be repository/project agnostic
Update the settings of the repository to enable a private or public wiki
This is probably the simplest and richest replacement to your note pad
2 Use a repository
Create a repository which will act as your work log
commit Markdown (i.e readme.md or index.md) files
Note: in the case of a hosted instance this could even be a repository associated to your user rather than a project.
This is very manual, though it does mean you can have an offline version of your "pad" that you can edit/search in your IDE with some IDE autocomplete. Just like the wiki you can use the code backtick escapes with syntax highlighting. Last I checked the these were rendered pretty well in the browser through bitbucket.org as well as any editor/IDE you might use.
Regarding todo's
I've found the best cheap todo solution for me is using a gist as described on life hacker. They are low ceremony and versioned which checks all my boxes (excuse the pun). If you couple that with the above you may actually be able to embed it into your bitbucket wiki, though I've not tried.
If you are using JIRA and Bitbucket already, maybe consider Confluence? Confluence has some convenient and easy to manage TODO functionality and it lets you expand on those thoughts with all the power of a wiki when you are done.
I keep a "TODO" page and additionally put the checkbox on any tasks in other pages. They are all aggregated together in a tasks view.
See:
https://confluence.atlassian.com/conf54/confluence-user-s-guide/managing-changes-and-notifications-and-tasks/managing-tasks-in-confluence

Is there a way to edit the source code of the JIRA Issue Collector?

I am trying to allow users to create issues from a webpage, just like the Issue Collector. The problem is, there are only three templates provided for the collector and none of them are quite right.
What I want is to have three required fields that then combine to become the description. (Similar to how the first template has "what do you like" "what do you not like" which both go in the description)
The problem is there's no obvious way to edit the popup's contents.
Is there any way I can get at the source code of the collector to create my own modified version? Alternatively, if I just copy the html of the popup using inspect element could I create a working clone?
EDIT: Well, I've managed to get at the source code using a java decompiler, but now I haven't got a clue how to put it back together again...
Do you have a paid license for JIRA? If so, Atlassian will give you a copy of the source code.
From their FAQ's
After an order has been placed, how and when can the license key and source be accessed?
Access to your license key(s) and any
applicable source code is provided only after the successful receipt
and processing of your payment. Once payment is received, the Billing
and Technical contact specified on the order can log into their My
Atlassian account, and view all corresponding license keys.
And instructions on how to "put it all back together" :)
Then you are free to customize to your heart's content.
Of course, you'll need to re-customize every time there's an update from Atlassian ...
See also this post on Atlassian's wiki

How to set Asana so emailed-in Tasks are brought to my attention when I log in, without manually searching for them each time?

I just started using Asana to manage bug fixes/feature requests from my clients, and I can't hardly believe that every single time I open it I need to manually ask it to show me unassigned tasks and assign them by hand to myself to get them to appear on the My Tasks view. Anything coming in by email (which is how I'm going to have my clients do it) is unassigned, and Asana gives me absolutely no clue when I log in if an unassigned task is waiting for me to assign it, and it will remain hidden from my to-do list (the My Tasks view) until I do.
There are existing solutions on SO for how to search to find unassigned tasks; those are not what I'm after, as those are how to do manual one-time searches, but I want Asana to tell me the things I need to know about without me either having to remember to manually ask for them every single time I log in, or risking missing something time-sensitive.
Alternatively, if it would either automagically assign mailed-in tasks to me, or let me set my "All Tasks" bookmark to be the default view as soon as I log in, either of these would suffice. I can't find any way of doing any of these things—my goal is that 100% of user-submitted tasks be brought to my attention without me having to remember to look for them (otherwise I could just stick with my dubious previous system of remembering to search my email inboxes.)
If you're using one email address to assign tasks (from a form or whatever) you can go to account settings -> from email and add your email address. That will automatically assign those tasks to you.
Here's the asana docs for it: https://asana.com/guide/help/email/email-to-asana
Otherwise, you can use Zapier (or similar service) to manage creating tasks via email for you if you'd prefer not mess around with the API.

ASANA API - get only projects associated to me

when you query /projects I get every project in the organization(a-lot) ... is there anyway to just get projects that I am interested in (ie task assigned to me, mention of me, or one that I have flaged as following?)
I have also tried
users/me/projects
projects?followers=me
That's a really interesting idea. We don't currently have a way of doing that - even in the product! - in part because everyone's definition of "interesting to me" is a little different. For instance, there's no global way to look up, for a user, all the comments they're mentioned in - mentioning adds a user as a follower to the task, sure, but they might be removed from the followers list subsequently. Should projects with tasks that I hearted be included? What about projects with tasks that have comments that I hearted? Projects with tasks that I'm following, sure - but what if the last time I followed a task in that project was over a year ago, and the task I followed is long since complete? Since tasks can be in multiple projects, does it make sense to include a project that I may have never even seen, but includes a task that's also in a project I work on, and so I've touched it? It's a tricky question to get right for everyone, to be sure.
In the meantime, you can get tasks that are assigned to you in a workspace (GET /tasks?workspace=[id]&assignee=me) and then crawl all the tasks to find the projects they're in (I know, not terribly elegant).
We currently don't expose projects/tasks you're following or projects you've favorited (starred) via the API. And as far as I know there's no way to query stories/tasks you're mentioned in via the API or the app.

Update URL in Asana returns nothing

When I use
https://app.asana.com/api/1.0/workspaces/workspace-id/tasks -d "name=this is a new task"
and then also using the POST method... I get a response, but nothing is created in asana...
This is the response in JSON format
{"data":{"id":5480677401703,"created_at":"2013-05-17T12:55:21.298Z","modified_at":"2013-05-17T12:55:21.298Z","name":"","notes":"","completed":false,"assignee_status":"later","completed_at":null,"due_on":null,"workspace":{"id":1337166104874,"name":"mecad.co.za"},"assignee":null,"parent":null,"followers":[{"id":1337166104857,"name":"Andries Koorzen"}],"projects":[],"tags":[]}}
But I don't see anything in asana
I guess you may have problem with the server itself. You would better start the ISS.
Rather, you can control the postLinkClicked method to see if there is a problem.
(I work at Asana) Where do you expect the task to show up? You have not given your new task an assignee or a project, so it will not show up in your My Tasks list, nor will it show up under any project. Try setting something in the assignee or project field.
But it also looks like you have a problem specifying details for the task, since you're attempting to pass a name but it's not being accepted by the system. My guess is something about the way you're doing this is not actually sending the correct POST data to the Asana API.

Resources