Weekly reports for the project (task): T161034 will be updated here.
Reports also posted on my [[https://www.mediawiki.org/wiki/User:Fz-29/Add_a_hierarchy_type_to_the_Cargo_extension | MediaWiki page ]].
===Community Bonding Period===
**Report 4 May - 10 May : Community Bonding Period**
- Interacted with mentors, shared my GSOC preparation and celebration experience. Nischay told about his GSOC days.
- This week was majorly about celebration and then I got busy with end semester exams.
- Created a Skype conversation for all the project mentors for easy and fast communication
**Report 11 May - 17 May: Community Bonding Period**
As required by the GSOC program, I performed the required tasks and in addition I had discussions with my mentors.
- Joined the Wikimedia's Zulip channel for GSoC
- Introduced myself on the Wikitech-l Mailing List
- Pulled the latest version of development branch of MediaWiki and Cargo
- Discussed what tasks to be performed regarding community bonding phase with mentors
- Brought my blog domain live
- Connected with fellow participants on Facebook
- Created a reporting task for my project at Phabricator
- Installed some new tweaks in my Linux working environment for a new design and more productivity
**Report 18 May - 24 May: Community Bonding Period**
- Discussed implementation details (such as storing hierarchy in WikiText and parsing WikiText) with Yaron
- Explored Cargo Extension by trying and playing around to understand its capabilities.
- Revised SQL concepts
**Report 25 May - 29 May: Community Bonding Period**
- Relating Cargo Features with code. Figuring out which functionality corresponding code resides where.
- Learnt about basic method for storing hierarchies efficiently - [[ http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ | helpful resource ]]
- A brief meeting with mentors on Skype regarding confirmation of bi-weekly project meetings on our Skype group conversation.
- Discussion with other GSOC participants on an informal WhatsApp group, regarding their projects and organisation practices.
- Going through [[https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker/Extension_Writing_Tutorial | Basic Extension Writing Tutorial ]] and [[https://www.mediawiki.org/wiki/Manual:Developing_extensions | Guide for developing extensions]] to understand various components of an extension and the purpose that they serve.
=== Coding Period ===
**Report 30 May - 5 June: Coding Period (Week 1)**
- Discussion with the mentor, Mr. Yaron, on the implementation of hierarchy field in cargo_declare. At first, we thought of just nodes of the tree (hierarchy) adding "allowed values=" with "*". But then we realized that there is a little probability that even non-hierarchy input might start with "*", and would cause ambiguities. Hence we decided to add an additional parameter in the field description for hierarchy fields that would be 'hierarchy'. And it('hierarchy') would take no value just like 'hidden' additional parameter.
- Set up debug log environment in the MediaWiki.
- Added support for hierarchy field. (Changed - CargoFieldDescription.php - adding $mIsHierarchy variable to the class and implementing necessary changes in order to update it.)
- After discussion with the mentor, we realized that it would be good to implement PageForms to detect default input for hierarchy as a tree, so completed the part - Add support for hierarchy fields in the Page Forms extension - so that such fields automatically get the right input type ("tree"), with the right values filled in.
- **Cargo** code was modified to accept hierarchy Field Description.
- **PF** code was modified to set default input type as tree when field is heirarchy.
- Patches to both the repositories were initiated.
**Report 6 June - 12 June: Coding Period (Week 2)**
- Discussion regarding the efficient implementation of Hierarchy Fields.
- I searched up and proposed Adjacency List or Nested Set Implementation Details.
- As asked by Mr. Yaron, I created a [[https://docs.google.com/spreadsheets/d/1PWAyG_VWvOSIxdnmbD0tjvcdWvSIkVDCtbKkQccxakw/edit?usp=sharing | spreadsheet ]] indicating table schemas and sample queries for both the approaches.
- I also implemented [[https://github.com/fz-29/cargoTesting | sample codes ]] for both approaches for single value fields.
- The work got delayed as I got sick due to the flu, but since all sample queries and sample codes are ready, the implementation should be fast.
**Report 13 June - 19 June: Coding Period (Week 3)**
- We finalised the column and table names for the hierarchy tables.
- Mentors helped me to improve the spreadsheet document which will serve as a lookup guide during the hierarchy database implementation.
- Mr. Yaron, asked me to change the foreign key from "id" to the string of the field. So I tried to investigate any possible negative impact. To have an external opinion, I also discussed the matter with my classmate.
=== Links to blog post ===
|**Week** | Blogpost Link | Due Date |
|**Week 1 + 2** | [[http://blog.ferozahmad.com/foss/GSOC-Week-2 | Blogpost]] | (Due May 18th, 2017) |
|**Week 3** | [[http://blog.ferozahmad.com/foss/GSOC-Week-3 | Blogpost]] | (Due May 25th, 2017) |
|**Week 4** | [[http://blog.ferozahmad.com/foss/GSOC-Week-4 | Blogpost]] |(Due June 1st, 2017)|
|**Week 5** | [[http://blog.ferozahmad.com/foss/GSOC-Week-5 | Blogpost]] |(Due June 8th, 2017)|
|**Week 6** | |(Due June 15th, 2017)|
|**Week 7** | |(Due June 22nd, 2017)|
|**Week 8** | |(Due July 6th, 2017)|
|**Week 9** | |(Due July 13th, 2017)|
|**Week 10** | |(Due July 20th, 2017)|
|**Week 11** | |(Due July 27th, 2017)|
|**Week 12** | |(Due August 3rd, 2017)|
|**Week 13** | |(Due August 10th, 2017)|
|**Week 14** | | (Due August 17th, 2017)|
|**Week 15** | |(Due August 24th, 2017)|
|**Week 16** | | (Due September 7th, 2017)|