ASANA API - get only projects associated to me - asana

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.

Related

Asana developer

we use Asana as our internal project management platform. We would like to use it to interact with our clients so they can see the progress of their projects - which is the same per year. We created the Kanaban view and move the cards through each process. We would like to show this to our clients, but have them only see their card.
Is there a way of doing this?
Thanks
There isn't a way that I'm aware of to have only certain tasks show up to certain people within a project - our access control is limited to the project level, so everyone who can see a project can see all tasks in a project.
One thing you might consider as a workaround is to multi-home the tasks into multiple projects (that is, add them into multiple projects). In this way you can limit membership to the second project to only the people in that set of clients, and have your original project as a master board with just your team in it.
You will have to keep these projects in sync, but this is possible in our API. Our tasks/addProject endpoint accepts both a project and a section (which is admittedly a bit unintuitive). If you maintain a mapping of each section, that is, "ID of Column A in the master board view maps to ID of Column B in the client board view", you can periodically iterate over all your tasks and re-insert each task in the client board view in the correct column based on where the task is in the master board view. (addProject is idempotent across requests, so re-insertions into a project are OK).
This is an interesting use case, thanks for sharing it! Hopefully this workaround will prove to be usable.

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

Remove old API data in database no web hook

new to ruby and ruby on rails here.
Have database which gets all articles from API and saves it. This works by find or create, however this way it never deletes articles. It only gets the current articles and new articles, but no webhook to tell me if an article is removed. How can I do this without a web hook to tell me if an article has been removed? Purging database every day is not an option because of other data linked.
I can't seem to find anything without the use of webhooks. Any one ideas?
If you have no Webhook to tell you the article removed-status. You only have two ways to remove the old-article.
Use polling to query the API to check the article removed-status. If the article has removed been checked by your polling, you can remove the old-article.
Set a time-base, for example : seven days, then if the article created in your database over seven days, you seem the article to a old-article, and you remove the old-article.
The disadvantage of 1.way make more system cost.
The disadvantage of 2.way is inaccurate.
All the ways aren't perfect, but if you have no Webhook, this is only two ways that you can do.

Asana API roadmap - getting completed tasks (including archived)

Do you plan to add possibility to retrieve (via API) all tasks from project including those which are archived?
(I work at Asana)
That would be a useful feature and we are already planning on adding it. However, I can't comment as to when it will be possible.
Until the API officially supports this, you can always query /tasks?completed_since=now to get only incomplete tasks, then query /tasks, and filter for tasks that only appear in the second list.
Archived tasks can be accessed by including the parameter ?include_archived=true in your request for querying tasks by project.
Task section in Asana documentation
I am trying to do this exact same thing as well. We are using a project to track line down events on our manufacturing floor. I found this post helpful and you can append “?include_archived=true” to your query but I found out that you can also do a reverse lookup on tasks by their tag. This will also show achieved tasks as well.

Query for open tasks in Asana

We're looking at using Asana to combine CRM, administration and issue tracking in a web dev firm. The key feature we need is a view of the "next actions" or "top [1|2|3] priorities" across all projects in a workspace, irrespective of who they are assigned to. It seems Asana does not provide this out of the box (is that right?) so I am looking into writing API queries to pull this out into a dashboard of our own.
I understand you don't want to let people pull ALL tasks in one workspace, as it may grow, but is there a way to pull out the top few open tasks in each project, without having to specify the assignee?
(I work for Asana)
Currently, the API allows you to grab all tasks in a project, see https://asana.com/developers/api-reference/projects. It will return them in ranked order (the same as they would show up in the Asana UI), however it won't limit them to some number; you'll have to get them all. Limits and pagination are on our roadmap to enable developers to work more efficiently with larger projects and workspaces.
So, it seems like you'd want to grab all projects, then iterate through them and query all tasks - this will give you their name and ID by default. If you want more detail for the ones you're going to show, then I recommend querying the details on each of those tasks individually.

Resources