Project Analysis - Developer Feedback
Links and information:
Bit-bucket: https://bitbucket.org/GLiNTECH/calendar-sync-for-jira/src/master
Docs: Calendar Sync for Jira
Overview
This project is a JIRA add-on called Calendar Sync for JIRA.
built using AngularJS (1.8.3) on the client side and Node.js on the server side.
It integrates with JIRA using Atlassian Connect and provides calendar synchronization features.
Allows users to export JIRA issues (using a variety of filters and conditions) into a calendar file or calendar link to keep their gmail/outlook calendars in sync with jira issues that have dates or times.
The project is quite old, with its AngularJS codebase being around 9 years old and last updated 2 years ago to work with Node.js 12. Many of the dependencies used in the project are deprecated, and the stack is in need of modernization.
Folder structure:
There are four main directories to consider:
Each top level directory except the client folder have dedicated
build.sh
scripts that compile the project.
client - Client-side code (AngularJS)
server_cloud - Server-side code for the cloud version (Node, Typescript, ACE)
schema - Database schema and migrations (uses Umzug: https://github.com/sequelize/umzug)
server - Server implementation
server-common - Shared server-side code
server_plugin - JIRA 9.7
server_plugin_jira7 - JIRA 7 compatibility
Front-end - Angular client
Uses AngularJS (1.8.3)
The last version before the new Angular.
AngularJS was deprecated on December 31, 2021 after a LTS period on the final version 1.8.3 , which is no longer supported.
Current version is v19.
The angular project is about 9 years old, with the last update being 2 years ago where it was updated to work with Node 12.
Many of the packages are deprecated
Completely in Javascript no Typescript.
Framework:
AngularJS (v1.8.3): The last version of AngularJS before transitioning to modern Angular (Angular 2+).
Officially deprecated on December 31, 2021, and no longer supported.
The current version of Angular is v19, making this project significantly outdated.
There are dependencies on outdated angularJS modules (angular-cookies, angular-drag-and-drop-lists, angular-messages, angular-route, angular-sanitize) which are all unsupported.
Build Tools:
Babel: JS transpiler.
Gulp: Task runner for building and testing.
Prettier and ESLint: For code formatting and linting.
Building the client
npm run build:cloud
npm run build:plugin
Server - Cloud
Technology used
Uses Beanstalk to deploy code to AWS
Uses sequelize
Uses the Gulp build system
Uses Jasmine for tests (has comprehensive tests)
Uses Typescript
Postgres (Works fine on PostgreSQL 15.8)
Database Schema
The app does not appear to store any information aside from when to sync/last sync.
The schema uses Umzug to perform database migrations
Tables:
addonSettings - App settings
CalendarRefreshNeed - Holds data about when to refresh next.
InstallationRefreshNeed
Installations - App installations
ProjectRefreshNeed
ProjectRefreshProjects
SequelizeMeta (Umzug) - Holds migration details
Building the cloud app
Checkout the html-links-fieldlength
branch which contains the most recent updates.
Steps:
Navigate to the server_cloud directory:
cd /server_cloud
Compile the frontend and backend:
Run the build script:
./build.sh
Installs dependencies, lints, and builds both the client and server components of the project.
Copies necessary files such as views and client assets to the server's dist directory.
Set up
credentials.json
file as required for Atlassian Connect apps.Configure the PostgreSQL database:
Setup postgres database (
database_dev
)Populate authentication fields in
config.json
Update the postgres database schema:
Run
npm run migration -- migrate
Running the application:
Export your Ngrok base url:
export AC_LOCAL_BASE_URL=<https://your-ngrok-id.ngrok.io
>Run
npm run start
The app should be running on
<http://localhost:3000/atlassian-connect.json
>Start ngrok tunnel (if ACE didn't automatically start it):
ngrok http 3000 --hostname=your-ngrok-id.ngrok.io
Install into your cloud instance
The atlassian connect json should be available though your ngrok service:
your-ngrok-id.ngrok.io/atlassian-connect.json
<https://my-site.atlassian.net/plugins/servlet/upm
>Click on Upload App and enter your
atlassian-connect.json
url
Once installed the configuration can be done through the Jira admin config
<https://my-site.atlassian.net/plugins/servlet/ac/expium-calendar-sync-for-jira/config
>
See the following documentation for usage instructions: Configuration
The instructions are for Data Centre but the UI is shared between DC and Cloud.
Use the
/client/config.json
to set up the environment variables to use your postgres instance
Server - Data center
The data center version uses the same frontend code as the cloud version.
Has been updated to work with Jira 9.7
Uses Java 8
Challenges maintaining/expanding the code-base
Outdated Technology:
AngularJS is deprecated, and the project needs to be migrated to React.
Node.js 12 is end-of-life, needs to be updated.
The difference between AngularJS and modern Angular is huge as they are both entirely different frameworks, this makes maintaining and extending legacy AngularJS code significantly harder.
Deprecated Dependencies:
Many dependencies are no longer maintained and need to be replaced.
Complex Architecture:
The multi-tenant database schema adds complexity to migrations and testing.
Shared code between client and server (client-common and server-common) is manually synchronized, which is error-prone, and difficult to work on say just the cloud version without affecting data center versions.
Testing:
The project uses Gulp for testing, which is outdated. Modern testing frameworks like Jest is standard.
Other notes
The functionality performed by the App doesn't seem to be that extensive, as it's mostly filtering jira issues based on criteria on a schedule, and provides the output as a link or downloadable calendar file to be imported into a mail application.
In theory, It could be done in forge, with less effort having to maintain the application. But migration of legacy data would be difficult if they exist on DC, especially as there's no Export feature to export your calendar configs.