Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 3.04 KB

README.md

File metadata and controls

45 lines (38 loc) · 3.04 KB

Timelines

Provides reporting from Clickup timelines data

What is it?

This service pulls data from the Click-up project management software via and API and stores the data in a SQL database that is accessible to the Planning tools reports.

Stack

Project structure

  • NICE.Timelines.Common - contains models, constants and extension methods common to all projects
  • NICE.Timelines.ConsoleApp - Entry point, calls the ClickUp API
  • NICE.Timelines.DB - Converts and saves the ClickUp data to the database, contains models and migrations for Entity Framework
  • NICE.Timelines.Test - low-level unit tests, run via xUnit, asserted with Shouldly.

Technical stack

Set up

  1. Install SQL Server and SQL Server Management Studio (SSMS)
  2. Clone the project at https://github.com/nice-digital/timelines.git
  3. Open NICE.Timelines.sln
  4. Ensure NICE.Timelines.ConsoleApp is set as the startup project
  5. Update the values secrets.json file
  6. Press F5 to run the project in debug mode

Secrets.json

The application's uses appsettings.json to store configuration. However, since this is a public repository, confidential configuration information is stored in secrets.json In order to run the application correctly (with it having access to a database and clickup api), you'll need to acquire (from another dev) or create a secrets.json file with the correct configuration information in. For more information see: https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?tabs=visual-studio

Entity Framework Migrations

We use Code first Entity Framework migrations to update the consultations database

  • add a new property to the relevent class in NICE.Timelines.DB > Models
  • in visual studio go to Tools > NuGet Package Manager > Package Manager Console
  • in the package manager console window run the command Add-Migration [give your migration a useful name] eg Add-Migration AddTaskCreationDate
    This will create a new migrations script in NICE.Timelines.DB > Migrations
  • when NICE.Timelines.ConsoleApp is next run the changes in the migration script will be applied to SQL.
    A new column will be created in EFMigrationHistory to flag that the migration has been run.

Good to know

For Developer notes see Confluence > Contacts Data Base / Planning Tool Home > Timelines Dev Notes