gnowledge/gstudio — pull request #924 by AvadootNachankar (2014-11-23 22:00:25+00:00)
Title: GList & TaskType Implementation

* **What to test?**

1. Run following commands:
- ```python manage.py filldb```
- ```python manage.py sync_existing_documents```

2. Check whether tasks are getting created successfully or not?

3. Try to set watchers and see if notications are going?

4. Check whether content is displayed in editor or not while editing; and verify files are also getting uploaded without any issues!

* **NOTE:** Group task creation commented as far now - facing issues due to latest changes done by me in Assignees value; which previously was list of usernames and now it is list of primary keys.

* **GList Implementation**

1. factory_type.py
- GList as GSystemType added.

2. management/commands/filldb.py
- Save modified for each TYPE (MetaType/GSystemType/RelationType/AttributeType) of node: Now status field is also updated with value as "PUBLISHED"

3. management/commands/sync_existing_documents.py
- Code added to update "status" field from DRAFT to PUBLISHED for all existing TYPE's node(s)

* **TaskType Implementation & Other improvements**

1. settings.py
- GSTUDIO_TASK_TYPES variable added that contains following values:
- "Bug", "Feature", "Support", "UI Feature", "Other"

2. factory_type.py
- Added new relationship
- name: 'has_type'
- subject_type: ['Task'],
- object_type: ['GList'],
- inverse_name: 'is_type_of',
- meta_type: 'factory_types',
- object_cardinality: 1

3. management/commands/filldb.py
- Code added to save GList's GSystem(s) for GList TaskType (site-wide using GSTUDIO_TASK_TYPES)
- create_relation_type() modified
- Code added to save object-cardinality
- Also status set as PUBLISHED for all nodes

4. templatetags/ndf_tags.py
- jsonify() modified
- Parameter passed 'NodeJSONEncoder' (defined in models.py) to json.dumps() that helps in parsing ObjectId and datetime values

5. views/ajax_views.py
- get_group_member_user() modified
- Now returns details of members of the group in dictionary format where key-value pair:
- key: primary key from Django's User table
- value: username of the User

6. views/methods.py
- create_grelation() modified
- Bug fixed: In few cases, was not updating node's relation_set field!

7. management/commands/sync_existing_documents.py
- Code added to update object_value of Assignee GAttribute(s) to list of primary keys
- Old values might be basestring or list of user-names

8. views/task.py
- TaskType Implementation
- Bug fixes:
- Saving Watchers and sending notifications
- Values stored for Assignee GAttribute:
- Previously storing list of username(s); now instead storing list of primary key(s)

9. templates/ndf/task_create_edit.html
- TaskType Implementation
- Error messages' css updated
- Bug fixed for Describe (content_org): Previously content wasn't shown while editing
- Bug fixed for watchers
- Doesn't sending notifications
- Previous selection not getting reflected while editing
- Group task functionality commented (Facing issues)

10. templates/ndf/task_details.html
- TaskType Implementation