0

I am building a visual frontend for clients to show tasks in Asana and I need to be able to separate stories on a task by some kind of "flag" that would determine if the story is public/private

The idea was to use the "Pinned" status to determine if if it is public/private, but that doesn't seem to appear in the API.

Alternatively I was considering "hearting" but I am not sure how to heart in Asana?

Is this possible?

viion
  • 365
  • 2
  • 10
  • Mentioning "pinned" and "hearting" I am lead to believe you are only concerned with comments (referenced as stories in the API. Is that correct? Can you explain what you mean by public vs private? By "public" do you mean visible to everyone in the organization and then"private" being restricted access control? Do you just need to know which users can see the comments? – Andrew Noonan May 14 '15 at 21:57
  • @AndrewNoonan Hi Andrew, in terms of private/public it would be something to distinguish comments that I could use as a private/public flag, not a visibility within Asana itself. I already contacted the API Support on this and they said it is not possible to view pinned stories. I also found out you can only heart other peoples comments, so both are no good to me. My application needs a way to separate stories to either: Private or Public soley on what the API response can provide. Right now we are detecting for "@client" as the first one, those stories are classed as "visible". – viion May 15 '15 at 19:31
  • I think I more fully understand your use case. You would like to programmatically mark a story so that you can later determine that this story has been marked as public or private for your front-end view. Does that sound right? If so, I think I have a solution for you. Also, in your scope, are stories limited to comments or other story types as well, such as attachments? – Andrew Noonan May 15 '15 at 23:32
  • @AndrewNoonan Hi Andrew, yes that does sound right. For attachments it is not much of an issue right now. All attachments are hidden except the ones they upload and this is done by an special user setup to attach through the API. The front end view of my application allows any attachments by this "special user" to be viewed. So that is fortunately ok as we don't need clients to see our attachments, only their own. We were originally thinking of making it so comments by the "special user" could only be visible on the front end but its tedious for our workflow. – viion May 16 '15 at 20:11

1 Answers1

1

You are correct that neither pinned nor hearted fields are included in the payload for stories.

However, in order to achieve your goal of programmatically marking a story with some custom flag for a client to later read you could leverage Custom External Data.

Custom external data allows your application to store a string ID and blob of unicode-safe serialized data such as JSON or YAML. Currently, custom external data is only available on Tasks, see the external parameter.

I would recommend using this mechanism to store the IDs of the stories which you would like to mark with some kind of status such as "private" and then have your client use this data store to look up those values after reading stories but before displaying.

Note: Custom external data requires OAuth as the data is app-specific.

Andrew Noonan
  • 848
  • 6
  • 13
  • Thanks for the response, I will look into custom data and see if that is viable solution and how it could be integrated in a way that reduces the amount of manual data entry required. – viion May 16 '15 at 20:16