Published on

Google Summer of Code 2024 (INCF)

Authors
  • avatar
    Name
    Ayush Bhardwaj
    Twitter

Project Description

LORIS (Longitudinal Online Research and Imaging System) is an open-source, web-based data management software for neuroimaging research. It specializes in storing and processing behavioral, clinical, neuroimaging, and genetic data, particularly for longitudinal and multi-site studies. The platform features an Issue Tracker module that enables users to submit and monitor data-related issues through a form with pre-defined fields and attachments. During Google Summer of Code 2024, I worked on enhancing the Issue Tracker module and resolving system-wide bugs to improve LORIS's functionality.

Project Goals

  • Enhance the Issue Tracker module with new features and improvements.
  • Improve the user experience when managing issues.
  • Fix existing bugs in the LORIS codebase.

Key Accomplishments

1. Batch Mode for Issue Tracker

Batch Mode

Developed batch mode for the issue tracker to streamline issue management for developers and coordinators:

  • Added filters by category, priority, status, and site for quick issue sorting.
  • Reduced clicks and time needed for updates and bulk operations.
  • Simplified UI for quick access to priority, category, site, and assignee info.
  • Integrated top comments, new comment, and user assignment features.
  • Enforced permission-based access control for secure management.

This interface improves productivity in issue handling.

Related PRs:

  • #9339 - [issue_tracker] Add Batch Mode
  • #9425 - [issue_tracker] Enable editing of site, assignee and watchers in Batch Mode
  • #9434 - [issue_tracker] Convert batch/normal mode toggle to tabs and implement permission control

2. Bug Fixes and Improvements

  • Add Instrument Dropdown Selection

    • PR: #9311 - [issue_tracker] Add Instrument dropdown to Issue form
    • Issue: #8896 - Add ‘Instrument’ from a drop down of all instruments
    • Changes:
      • Added instrument selection dropdown to Issue Form.
      • Updated database schema and migration scripts.
      • Modified backend to handle instrument data.
      • Enhanced UI for instrument selection.
  • Fix Watching Field Persistence Bug

    • PR: #9323 - [issue_tracker] The "watching ?" field is taking the "no" value when an issue is updated
    • Issue: #9315 - The "watching ?" field is taking the "no" value when an issue is updated
    • Changes:
      • Fixed watching status reverting to "no" on updates.
      • Resolved internal server errors.
      • Updated field change tracking.
  • Resolve Issue Display Error

    • PR: #9367 - [issue_tracker] Resolve Iterator Error in getComments() Method
    • Issue: #9366 - Getting "An error occurred while loading the page." when trying to display an issue in main branch
    • Changes:
      • Fixed query object iteration error.
      • Resolved loading issues in Issue Tracker.
      • Improved error handling.
  • Add Description Field to Issues Table

    • PR: #8864 - [issue_tracker] Add description field to issues table
    • Issue: #8353 - Cannot edit description of already created issue
    • Changes:
      • Added description field to the issue creation/modification UI.
      • Modified update_issues_with_description.php script to migrate existing descriptions.
      • Updated Raisinbread SQL file accordingly.
  • Update Deprecated Function Calls

    • PR: #9280 - [issue_tracker] Deprecated LORIS function call in recreate_conflicts.php script
    • Issue: #9267 - Deprecated LORIS function call in recreate_conflicts.php script
    • Changes:
      • Refactored recreate_conflicts.php to replace the deprecated Utility::getAllInstruments() function.

3. Testing and Review

  • Conducted comprehensive testing for all implemented features and bug fixes.
  • Presented the Batch Mode and other enhancements to the entire development team (15–20 members), facilitating feedback and discussions.
  • Due to the feature's importance, engaged five key team members in the review process to refine functionalities, ensure code quality, adhere to project standards, and promptly address feedback, resulting in a robust and well-integrated feature.

Current State

The project has successfully delivered its primary objectives:

  • Batch Mode is fully implemented and operational (Issue #9268).
  • All assigned bug fixes, the addition of the fields in the issue tracker and other enhancements, have been completed.

Remaining Work

Some features are currently in progress or planned for future implementation:

  1. Stress testing for large numbers of issues (1k-50k).
  2. Batch closure of multiple issues.
  3. Additional UI refinements (Issue #9423).
  4. Performance optimizations for large datasets.

Code Integration Status

Merged Pull Requests

  1. #9339 - [issue_tracker] Alternative view for issue hunting
  2. #9323 - [issue_tracker] The "watching ?" field is taking the "no" value when an issue is updated
  3. #9367 - [issue_tracker] Getting "An error occurred while loading the page." when trying to display an issue in main branch
  4. #9280 - [issue_tracker] Deprecated LORIS function call in recreate_conflicts.php script
  5. #8864 - [issue_tracker] Add description field to issues table
  6. #9311 - [issue_tracker] Add Instrument dropdown to Issue form
  7. #9434 - [issue_tracker] Convert batch/normal mode toggle to tabs and implement permission control
  8. #9425 - [issue_tracker] Enable editing of site, assignee and watchers in Batch Mode

Technical Challenges

Throughout this project, I encountered and overcame several technical challenges:

  1. Complex State Management: Implementing batch mode required careful consideration of state management across multiple components.
  2. Performance Optimization: Ensured smooth performance when handling large numbers of issues by optimizing SQL queries and implementing techniques like pagination.
  3. Understanding the Existing Codebase: Integrating with LORIS's existing permission system and utilizing prebuilt components while adding new functionality required a deep understanding of the system, components, and database tables.

Key Learnings

  • Gained a deep understanding of LORIS architecture and development workflow.
  • Acquired hands-on experience with PHP, React, and SQL in a production environment.
  • Understood the importance of thorough testing and documentation.
  • Appreciated the value of community feedback and iterative development.
  • Enhanced skills in collaborative coding and conflict resolution during the merging process.

Acknowledgments

Special thanks to my mentors and the LORIS development team for their guidance and support throughout this project. Their feedback and expertise were invaluable in delivering these improvements to the LORIS community.