How to get rich text formatting from asana task API - asana

Asana added rich text formatting in June 2014 (https://blog.asana.com/2014/06/rich-text/)
How do you get the formatting metadata from the Asana API?
For example, if I fill in a task description with:
some bold text. some italic text
a list
foo
bar
sublist
a
b
c
baz
The API returns the following for the note field, which excludes any formatting info:
"notes":"some bold text. some italic text\n\na list\n\nfoo\n\nbar\n\nsublist \na\nb\nc\nbaz"

We do not currently support rich text formatting via the API. However if you're feeling adventurous, we are currently working on this support, and you can try it out by using html_notes (for tasks) and html_text (for stories). You can request them using ?opt_fields=html_notes, for example.
Note however that this is still very experimental/early support. If the parser doesn't like the HTML you post, it just strips everything back to plaintext. So this is really only if you're feeling particularly adventurous - otherwise, I'd wait until we release full-fledged public support for it, with documentation and everything.

Is this still something "experimental"? I didn't want to post an answer but it won't let me comment the existing answer. So far I have found:
Acceptable
<b>
<ul>
<li>
Not acceptable:
<h4>
<p>
<div>
<section>
<br>
Any other suggestions for something to do a linebreak? Back in the day, I was using Wufoo to directly create tasks in Asana and it formatted it with a bold heading and then regular text for each entry data. I am trying to achieve this on my own without going that route because I am also updating a database when I receive the form submission. Any ideas on how to format (only the most basic of formatting)?

Related

How do you get inline code/text highlighting within a Jira ticket?

I am trying go find an option that does this kind of highlighting that is quick/easy to use within a Jira ticket. The links below I have read through. I don't want to use a {code} bracket every time I want to highlight a keyword or attribute to pay attention to ie:
schema.tableName.myColumn = true.
You can easily do this within Microsoft Teams, Discord if you are having trouble understanding what I am looking for. Is there anything else that is in the works or currently out there for the Jira community to use? Something as easy as using tick marks?
Resources Viewed:
Using a {code} block
Highlighting words with <style>
Code Block Macro
Closest to this, out of the box is the {{monospaced}} formatting. Just enclose the text with double curly quotes {{,}}. No fancy syntax highlighting though. See Jira's Wiki Style Renderer guide.
If you like, you could also try this plugin Markin.

How do you print different templates in netsuite?

I am trying to find the correct template and id to use for a hotprint of an advanced pdf template of an Item Fulfillment.
The hot print url is (with the id bolded) https://system.na3.netsuite.com/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&id=7600&label=Packing%20Slip&printtype=packingslip&trantype=itemship&orgtrantype=TrnfrOrd&auxtrans=7605
For some reason only certain id=# seems to affect the outcome and the ids I have got to work for two different templates don't match the Custom Transaction Forms ID or the Advanced pdf script id. (example most ids=template 1, while 168,4954, and seemingly random other ids=template 2) I am very confused on how netsuite resolves the hot print url as it normally doesn't include the template= part though I have seen others use it for invoice print urls.
The parameters at the end of the url (the stuff after the ?) are used by Netsuite to control settings used by the webpage which prints the PDFs for you.
In this case, &id=##### refers to the internal id of the document you are printing. You can see this by going to the document, right clicking, selecting inspect, and typing nlapiGetRecordId() into the console. When you click Print, you should see that same number after &id=#####.
&template=### refers to the template you are printing. If you go to Customization -> Forms -> Advanced PDF/HTML Templates, you'll notice a Script ID field in the table. If you substitute the correct Script ID in for the number in &template=###, you'll notice you generate the same PDF. This Script ID acts the same as the number that was previously there.
The reason you're seeing unusual results when you change those numbers is because you're mismatching a record with a template not built for it. So it won't print exactly right, but will sometimes execute anyways.
Anyways, this sort of parameter scheme is a similar scheme to how Suitelets and Restlets work, so in the future, you might experience this sort of thing again.
EDIT: For those reading this in the future, please read the comments.
To customize a packing slip and return form:
If you are printing packing slips and need some customization, you can use a custom invoice form when printing packing slips. For example, you can customize an invoice form to hide the fulfilled item tax rate and amount, and the order total. Then, when you print the packing slip using the custom form through mass print, choose the the packing slip shows the customized information.

How to fill in a datetime field with capybara?

I found this similar question How to fill in a datetime-local field with capybara?, and the only answer in this thread is not working. So I decided to open this question. It seems like there's no documentation or tutorial about this. Have any solution? It will be a great help!
The keys different browsers accept for setting a datetime input field are diffrent, however if you're using selenium with chrome and you are actually attempting to fill in a visible <input type="datetime-local"> element, as your question states, then the answer in the question your linked to should work - Here is a gist that shows it working - https://gist.github.com/twalpole/a541746b354afde8e82fa89a35a9b2da
The important part in that answer is the format of the string you send since it needs to match the keys the browser is expecting for setting that input (to_json doesn't match that format)
Therefore, in your case of wanting to set DateTime.current it should be something along the lines of
fill_in 'id/name/label of input', with: DateTime.current.strftime("%m%d%Y\t%I%M%P")
If that doesn't work for you then most likely you're not actually attempting to fill a visible <input type="datetime-local"> field (maybe you're using some kind of JS widget that replaces/hides the input???) and you'll need to specify the exact HTML you are trying to fill in your question.
from what I understand, you need to fill in a string representation of the datetime format
examples of such dates are
1990-12-31T23:59:60Z
or
1996-12-19T16:39:57-08:00
so something like
fill_in datetimeinput, with: "1990-12-31T23:59:60Z"
should work (hope so!)

How to make web site iPad ready? [duplicate]

How does the Reader function of Mobile Safari in iOS 5 work? How do I enable it on my site. How do I tell it what content on my page is an article to trigger this function?
A lot of the answers posted here contain false information. Here are some corrections/clarifications:
The <article> element works fine as a wrapper; Safari Reader recognizes it. My site is an example. It doesn’t matter which wrapper element you choose, as long as there is one, other than <body> or <p>. You can use <article>, <div>, <section>; or elements that are semantically incorrect for this purpose, like <nav>, <aside>, <footer>, <header>; or even inline elements like <span> (!).
No headings are required for Reader to work. Here’s an example of a document without any <h*> elements on which Reader works fine: http://mathiasbynens.be/demo/safari-reader-test-3
I posted some more details regarding my findings here: http://mathiasbynens.be/notes/safari-reader
I've tested 100 or so variations of this on my iPhone in order to figure out what triggers this elusive Reader state. My conclusions are as follows:
Here is what I found had an impact:
Having around 200 or more words (or 1000 characters including whitespace) in the article you want to trigger the "Reader" seems necessary
The reader was NEVER triggered when I had less than 170 words; although it was sometimes triggered when I had 180 or 190 words.
Text inside certain elements such as <ol> or <ul> (that are not typically used to contain a story) will not count towards the 200 words (they will however be displayed in the reader if the reader is triggered for other reasons)
Wrapping the 200 words in a block element such as a <div> or <article> seems necessary (that said, I'd be surprised if there were any websites where that was not already the case)
For full disclosure, here is what I found did NOT have an impact:
Whether using a header or not
Whether wrapping the text in a <p> or letting it flow freely
Punctuations (ie removing all periods, commas, etc, did not have an impact)
It seems the algorithm it is based on is looking for p-Tags and it counts delimiters like "." in the innerText. The section (div) with the most points gets the focus.
see:
http://lab.arc90.com/experiments/readability/
Seems to be the base for the Reader-mode, at least Safari attributes it in the Acknowledgements, see:
file:///C:/Program%20Files/Safari/Safari.resources/Help/Acknowledgments.html
Arc90 ( Readability )
Copyright © Arc90 Inc.
Readability is licensed under the Apache License, Version 2.0.
This question (How to disable Safari Reader in a web page) has more details. Copied here:
I'm curious to know more about what triggers the Reader option in Safari and what does not. I wouldn't plan to implement anything that would disable it, but curious as a technical exercise.
Here is what I've learned so far with some basic playing around:
You need at least one H tag
It does not go by character count alone but by the number of P tags and length
Probably looks for sentence breaks '.' and other criteria
Safari will provide the 'Reader' if, with a H tag, and the following:
1 P tag, 2417 chars
4 P tags, 1527 chars
5 P tags, 1150 chars
6 P tags, 862 chars
If you subtract 1 character from any of the above, the 'Reader' option is not available.
I should note that the character count of the H tag plays a part but sadly did not realize this when I determined the results above. Assume 20+ characters for H tag and fixed throughout the results above.
Some other interesting things:
Setting for P tags removes them from the count
Setting display to none, and then showing them 230ms later with Javascript avoided the Reader option too
I'd be interested if anyone can determine this in full.
Both Firefox and Chrome have the similar plugin named iReader. Here is its project with source code.
http://code.google.com/p/ireader-extension/
Read the code to get more.
I was struggling with this. I finally took out the <ul> markings in my story, and viola! it started working.
I didn't put any wrapper around the body, but may have done it by accident.
HTML5 article tag doesn't trigger it on my tests. It also doesn't seem to work on offline content (i.e. pages saved on your local machine).
What does seem to trigger it is a div block with a lot of p's with a lot of text.
The p tag theory sounds good. I think it also detects other elements as well. One of our pages with 6 paragraphs didn't trigger the Reader, but one with 4 paragraphs and an img tag did.
It's also smart enough to detect multi-page articles. Try it out on a multi-page article on nytimes.com or nymag.com. Would be interested to know how it detects that as well.
Surprising though it may be, it indeed does not pay any attention to the HTML5 article tag, particularly disappointing given that Safari 5 has complete support for article, section, nav, etc in CSS--they can be styled just like a div now, and behave the same as any block level element.
I had specifically set up a site with an article tag and several inner section tags, in prep for semantic HTML5 labeling for exactly such a purpose, so I was really hoping that Safari 5 would use that for Reader. No such luck--probably should file a bug on this, as it would make a great deal of sense. It in fact completely ignores most of the h2 level subheads on the page, each marked as a section, only displaying the single div that adheres to the criteria mentioned previously.
Ironically, the old version of the same site, which has neither article, section, nor separating div tags, recognizes the whole body for display in Reader.
See Article Publishing Guidelines.
Here are APIs about how to read and parse: Readability Developer APIs. There's already a project you can refer: ruby-readability.
A brief history:
The Safari Reader feature since Apple's Safari 5 browser embeded a codebase named Readability, and Readability started off as a simple, Javascript-based reading tool that turned any web page into a customizable reading view. It was released by Arc90 (as an Arc90 Lab experiment), a New York City-based design and technology shop, back in early 2009. It's also embeded in Amazon Kindle and popular iPad applications like Flipboard and Reeder.
I am working on algorithms for cleaning web-sites from information "waste" similar to Safari Reader feature. It's not so good as readability but has some cool stuff.
You can learn more at smartbrowser.codeplex.com project page.

Asana * Wufoo : Advanced integration

I am working on "Advanced integration" of a forms from Wufoo to Asana. SO far I have followed the Asana guide - https://asana.com/guide/help/api/wufoo
Guide is excellent and everything within the guide work as it says, but I need to go a bit further.
I notice that there is a bit of symbols that asana recognize from the forms( like quotes"" , equal ==, question mark ?), example of multiple choice menu:
"Chose person" == "asana tag" ? 1559453678421
"Chose person" == "asana person" ? blablabla#something.org
So in the following example I can have a multi choice menu that can assign task to a person and/or put a tag.
If I add a second person, that person become a follower, which is great.
My goal:
I want to make the form filler to add its email address, and that email address to be add as follower of the task.
What I know:
I have so far talked with Wufoo support and they told me that the text from the form goes in a straight text form to Asana, and asana actually recognize the form and create the specific tasks, for example:
<strong>This become BOLD text in asana</strong>
I keep on looking for the rest of the recognized symbols, but without success so far. If you have any kind of information regarding the "Advanced integration" I would love to know.
(I work at Asana.) Right now we only support routing through fields that are hidden (have the "hide" classname) with our Wufoo integration, but your use-case is very interesting. I'll take a look and see if we can enable this.
I have found a 2 workarounds to make this work for me.
Workaround 1
So far I have discover that asana recognize "hide" CSS Layout and the field labels : project,tag,assignee,follower . If these values are true then to make this editable I add a Wufoo form Rule that can show/hide fields. for example :
If "Email" contains "#" show "assignee"
And that rule does not change the CSS Layout Keyword "hide" so the form is send the same way with the only difference that the "hide" field is actually visible and that make it easily editable.
Workaround 2
By keeping the fields hide you can still edit them with "URL Modifications ". So basically have 2 forms linked together, so the first form fill up information that is send to the second form within the URL, so the fields remain hidden but being filled up by the URL. - I have not played with that much but Wufoo support briefly explain to me that its possible
URL Modification reference - http://help.wufoo.com/articles/en_US/SurveyMonkeyArticleType/URL-Modifications

Resources