Posted by peijun on May 14, 2014 at 8:01pm
Hi,
I just installed OA2 on my box. I am wondering if there is any way to create custom fields (say for task section) like Redmine?
Thanks
Hi,
I just installed OA2 on my box. I am wondering if there is any way to create custom fields (say for task section) like Redmine?
Thanks
Comments
Yes, you can add custom fields!
Yes, you can add custom fields! Open Atrium is built on Drupal, which allows you to add arbitrary fields to any of the content types.
So, adding a field to a Task is no problem, but there are a couple special considerations with Tasks:
And like with making any modifications to configuration that is managed by Features (all the default Open Atrium content types are), you should put your customizations into your own Feature using the Features Override module.
I hope that helps!
Thanks, please give me some detailed instruction
Thanks a lot, dsnopek.
I tried to follow the instructions in the features override module but I did not figure out how to do it. Maybe it is a little to much, could you please give me some detailed instructions?
Before I posted the question, I have tried several ways. Firstly, I modified the task content type by adding a new field. It works partially. I can see the new field in the creation form and edit form, but it disappears in the section of Update task and add new comment of view page. Also, this is global change. It is not what I need. I need the custom fields to be space/subspace specific.
Secondly, I created a new content type by cloning the original task content type and adding new fields. I added new taxonomy term to vocabulary Section type. I am able to see the new section type in the create new section list and able to create new tasks. However, after new tasks are created, they are showed only in Recent activity but not in Tasks table. If there are any ways to add the newly created tasks to the Tasks table, I think this strategy is fine for me.
Of course, what I did might not the right way to solve the problem.
Could you give me some hits?
Thanks,
Peijun Zhang from Canada.
More documentation and some short answers...
Here are some blog posts about Features Override that I hope will be helpful:
To answer some of your questions:
Like I mentioned above, in order to be able to modify the field via comments (like most of Task's fields), then you need to be sure to check "Enable altering this field from comments" when configuring the field.
Unfortunately, in Drupal fields are global for each content type. However, there is probably a way to make a field only visible in a particular Space or sub-Space. This could definitely be done in custom code, but is probably also possible using the Rules module. There may even be some OG-specific module somewhere that does this, but I'm not aware of it.
Sorry, this isn't something I personally have any experience with. :-/ Maybe another community member will know?
The "Task list" widget is a View that specifically filters for the original Task content type. So, you'll need to clone that View as well and modify it to show your new Task conent type.
I hope that helps!
Thanks
I followed my second strategy and your instructions and I solved the problem. Now I can add any custom fields which are space specific.
Thanks,
peijun
Thanks to all
I would appreciate peijun could explain how he achieved custom fields to be space specific. Thanks in advance.
Add custom fields
Hi All,
Here are my strategies. However, I do not assure they are perfect. Advices and suggestions are welcome.
I used two strategies.
Strategy 1
If there are only some custom fields need to add, I modify the original content type Task.
Or you can make a new view and new panelizer for content type Section page (see below)
Create features. (I did not do it. I think this is only useful when you update OA package. Am I right?)
Create two new features (one for OA users, one for OA Work Tracker) and install them.
Strategy 2
If your new task type is very different from the original one (say many custom fields, some fields in original task are not used), I would create a new content type.
Create a new content type, enable panelizer
Set panelizer Full page override
Setting: check Renderer Standard In-place Editor
Layout: select a layout, such as Bryant
Content: Add some major fields or Rendered Node full content to your content pane . Add Open Atrium Sidebar top (in Open atrium), Open Atrium Sidebar bottom (in Open atrium), and some small custom fields to sidebar.
Create new view
Create new task list view (display: view pane) for your new content type (You can add any types, actually). You can clone the view Open Atrium Task tracker and modify it.
Administrative title: your task Section
Renderer: Standard or In-place editor
Layout: Brant Flipped
Content: view: your new view:task list. Optional: this node title, this node body
Sidebar: Content visibility, group menu, etc.
Name: your new term
Section Layout: your new section created in 8.
Node Types: your new content task type (and other types if required)