LiquidPlanner Classic Forum
How can I post comment as HTML content ?
*Posted on behalf of a customer. Original posting date 2015-03-11*
I want to write the following comment into the LP from the rest API post function, in my case comment is creating but formatting is breaking. I want to write exact same formatted way. Please help me how can maintain format of the comment ?
original format of comment:
E-mail content (first draft, eager to do some changes, improvements etc.):
Invitation e-mail, send to someone who was added by manager or HR admin:
/e-mail_name/
Invitation to [App_name]
/e-mail_text/
Hi [user_first_name]!
Please click link below to register in [App_name]:
<link>[http_address]</link>
[App_name] allows you to check and book your vacation days quick and easily.
Best regards,
[App_name] Team
Example:
Invitation to Vacation App
Hi Adrian!
Please click link below to register in Vacation App:
https://vacation.forlagshuset.no/register?adsafskjhfasdf
Vacation app alows you to check and book your vacation days quick and easily.
Best regards,
Vacation App Team
E-mail send to the manager when user book vacations:
/e-mail_name/
Vacation request - [user_first_name;user_last_name]
/e-mail_text/
[user_first_name;user_last_name] booked [vacation_type] in: [start_date]-[end_date].
/if vacation type has limit/
He still has [day_number] [vacation_type] days left. If you accept this request, it will be limited to [day number] days.
/if there are comments/
Comments:
[user],[date]: [comment]
[user],[date]: [comment]
[user],[date]: [comment]
<link> ACCEPT REQUEST </link>
<link> REFUSE REQUEST </link>
<link> add comment </link>
<link>Go to [app_name]</link>
Example:
Vacation request - Adrian X
Adrian X booked paid vacation: 23.08.2014 - 28.08.2014
He still has 17 paid vacation days left. If you accept this request, it will be limited to 14 days.
When i am writing comment in the LP then the format become as following which i don't want.
E-mail content (first draft, eager to do some changes, improvements etc.): Invitation e-mail, send to someone who was added by manager or HR admin: /e-mail_name/ Invitation to [App_name] /e-mail_text/ Hi [user_first_name]! Please click link below to register in [App_name]: <link>[http_address] [App_name] allows you to check and book your vacation days quick and easily. Best regards, [App_name] Team Example: Invitation to Vacation App Hi Adrian! Please click link below to register in Vacation App: https://vacation.forlagshuset.no/register?adsafskjhfasdf Vacation app alows you to check and book your vacation days quick and easily. Best regards, Vacation App Team E-mail send to the manager when user book vacations: /e-mail_name/ Vacation request - [user_first_name;user_last_name] /e-mail_text/ [user_first_name;user_last_name] booked [vacation_type] in: [start_date]-[end_date]. /if vacation type has limit/ He still has [day_number] [vacation_type] days left. If you accept this request, it will be limited to [day number] days. /if there are comments/ Comments: [user],[date]: [comment] [user],[date]: [comment] [user],[date]: [comment] <link> ACCEPT REQUEST <link> REFUSE REQUEST <link> add comment <link>Go to [app_name] Example: Vacation request - Adrian X Adrian X booked paid vacation: 23.08.2014 - 28.08.2014 He still has 17 paid vacation days left. If you accept this request, it will be limited to 14 days.
Manually i am copy pasting the comment then the comment is writing as same as i want. But from REST api its breaking expectation. I have posted question at stackoverflow also, see the link below.
http://stackoverflow.com/questions/28963403/how-to-serialize-a-long-string-and-maintain-the-formatting?noredirect=1#comment46180125_28963403
Posted by LiquidPlanner Support about 4 years ago
non plain text comment with api
*Posted on behalf of Krisztian Buscsei. Original posting date 2014-12-12.*
Hi
Is it possible to upload non plan text comment with api? and how?
Thank you
Krisz
Posted by LiquidPlanner Support about 4 years ago
how can I post the comment into LP from rest api?
*Posted on behalf of a customer. Original posting date 2014-11-21.*
Hi support,
I have the documentation, according to that when i will post the request for a comment than i need following json
```
{
"comment": "Working on it...",
"id": 11111,
"type": "Comment",
"item_id: "77777",
...
```
```
}
```
1 doubt) according to me field "id" is comment id and "item_id" is task id, isn't it ?
2 doubt) If field "id" is the comment id then how can i post the new comment for task because for new task there is no any comment id.
3 doubt) For new comment for a task what value me should put into the Json ?
3 doubt) In my live server the task ids are 8 digits but in LP api documentation examples item_id is 5 digits, is it the cause of error 400
bad request ?
4 doubt) can i post the created OR updated date value within this comment for a task ?
i want to know what is the value of "id" field ? is that "id" the comment id ? it is comment id then please let me know without create a comment how can i get the comment id, that is not possible.
Posted by LiquidPlanner Support about 4 years ago
New/Updated Comment Trigger Issue - Tree Item Fields Are Empty
*Posted on behalf of Dave Boster. Original posting date 2014-09-16.*
When using the New/Updated Comment Trigger, my Tree Item fields are all showing as empty. The test i'm using is a comment on a task. I have information filled out for all of these fields on the task and the project. I've also tried comments on both a project and task with the same result.
The fields include: Tree Item Description, Tree Item Name, Tree Item Type, Tree Item External Reference.
Here is what the test preview looks like. Note the Plain Text field does translate correctly. When I send the test though, the {{}} fields are replaced with an empty string. I've also included a screenshot of what the Zapier screen looks like.
```
Tree Item Description: {{1902962__treeitem__description}}
Tree Item Name: {{1902962__treeitem__name}}
Tree Item Type: {{1902962__treeitem__type}}
Tree Item External Reference: {{1902962__treeitem__external_reference}}
Plain Text:
Test
```
Posted by LiquidPlanner Support about 4 years ago
Load all Projects and Comments at once
*Posted on behalf of Awilson. Original post date 2014-03-19*
I am currently using the rest api to grab all projects of a workspace, but I also want to retrieve all comments for each project. As it stand, I think I need to make an additional api call for each project to grab the comments. Is there a way to bring back the comments when i retrieve the projects?
to retrieve the projects I am using the url: api/workspaces/:workspaceId/projects
I have tried the url api/workspaces/:workspaceId/projects?include_children=all but that has not worked.
thanks
Posted by LiquidPlanner Support about 4 years ago