This tool has been created to help you to integrate data TargetProcess and SVN repository data, for further analysis.
Create a user and database link for example
CREATE USER "user" WITH PASSWORD 'password';
CREATE DATABASE "database";
GRANT ALL PRIVILEGES ON DATABASE "database" TO "user";
The default connection is a config for running in memory
slick.dbs.default.profile="slick.jdbc.H2Profile$"
slick.dbs.default.db.driver="org.h2.Driver"
slick.dbs.default.db.url="jdbc:h2:mem:play"
slick.dbs.default.db.user=sa
slick.dbs.default.db.password=""AliveConnection = true
Change to use a real database
slick.dbs.default.profile="slick.jdbc.PostgresProfile$"
slick.dbs.default.db.connectionPool = disabled
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql:database_name?user=postgres&password=default"
slick.dbs.default.db.keepAliveConnection=true
slick.dbs.default.db.users="postgres"
slick.dbs.default.db.password="default"
slick.dbs.default.db.maxActive=2
slick.dbs.default.db.maxConnections=20
slick.dbs.default.db.numThreads=10Threads = 10
repo.user = "your_user"
repo.pass = "pass"
repo.url = "https://svn..."
For agile flow data aggregation using [TargetProcess] (www.targetprocess.com) Currently only support basic authentication.
task_model = {
patternParser = "(#\\d)\\d+"
patternSplit = "#"
separator = ""
}
target = {
user = "user"
pass = "pass"
url = "https://example.tpondemand.com/api/v1"
}
Defines how the information about the tasks is extracted
patternParser = "(#\\d)\\d+" //task or fix #NUMBER
patternSplit = "#" //task or fix #NUMBER
separator = ""
> sbt "-Dconfig.file=/... path .../application.conf
$> runcurl --location --request POST 'http://127.0.0.1:9000/boot/YOUR_MAGIC_SECRET' \
--header 'X-API-Key: AbCdEfGhIjK1'
curl --location --request POST 'http://127.0.0.1:9000/api/v1/updateall' \
--header 'X-API-Key: AbCdEfGhIjK1'Open console and run the following command
> sbt testRun this on production, generate the package to run the application
> sbt universal:packageBinAnd copy the generate 'package' from target.
> ./path_generated/bin/target/universal/stage/bin/svn-targetprocess-aggregatorNote: Remember to open port 9000 on server
After configuration, run the application
All the scripts are in the folder 'scripts'
First remember to configure the the configuration file (/scripts/configuration.py)
- boot.py - dispatch a command to create the database structure
- configuration.py - configure this script level variables
- gemerate_reports.py - generate the reports
- last_commits.py - get the last commits from the repository
- update_auto.py - update the database automatically
- LOC/configuration.py - configure LOC script level variables
- LOC/count_lines_json.py - count the lines of code in the json file
This file defines all application routes (Higher priority routes first)
- GET /api/v1/authors
- GET /api/v1/authors/:id
- GET /api/v1/authors/bugs/:author - get the bugs of an author
- GET /api/v1/commits
- GET /api/v1/commits/:id
- GET /api/v1/commits/revision/:revision
- GET /api/v1/commits/:from/to/:to
- GET /api/v1/commits/custom/:customField/:fromTime/to/:toTime/csvQueryLocalDate
- GET /api/v1/commits/custom/:customField/:fromTime/to/:toTime
- GET /api/v1/tasks
- GET /api/v1/tasks/:id
- GET /api/v1/tasks/task/:taskId - get the task by targetprocess id
- GET /api/v1/tasks/nested/:parentId - get the tasks nested in a task
- GET /api/v1/committasks
- GET /api/v1/committasks/:id
- GET /api/v1/commitfiles
- GET /api/v1/commitfiles/:id
- GET /api/v1/files
- GET /api/v1/files/bugs - get the files with bugs related
- GET /api/v1/files/:id
- GET /api/v1/customfields
- GET /api/v1/customfields/:id
- GET /api/v1/customfields/field/:field
Generate a report like a dump for analysis this data in external tools
- GET /api/v1/dump/:from/to/:to - from commit to commit
- GET /api/v1/dump/:from/to/:to/csv - from commit to commit in csv format
- POST /api/v1/updateall - force update all data
- POST /api/v1/update - only update from the last commit stored in the database
- POST /api/v1/update/custom/:customField - update based on a custom field like task or fix
Sql code to create the database structure, in the file
/scripts/database_structure.sql.
Overview of the database structure
| Field Name | Field Type |
|---|---|
| api_key | Character Varying:I:U |
| name | Character Varying |
| active | Boolean |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| date | Timestamp Without Time Zone |
| ip | Character Varying |
| api_key | Character Varying:N |
| token | Character Varying:N |
| method | Character Varying |
| uri | Character Varying |
| request_body | Character Varying:N |
| response_status | Integer |
| response_body | Character Varying:N |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| token Character | Varying:I:U |
| api_key Character | Varying |
| expiration_time | Timestamp Without Time Zone |
| user_id | BigInt |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| author | Character Varying:I:U |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| typeModification | Integer:N |
| copyPath_id | BigInt:N |
| copyRevision | BigInt:N |
| path_id | BigInt |
| revision | BigInt |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| message | Character Varying:N |
| timestamp | Timestamp Without Time Zone:N |
| revision | BigInt:I:U |
| author | BigInt |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| task_id | BigInt |
| commit_id | BigInt |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| field_value | Character Varying:N |
| field | Character Varying |
| task_id | BigInt:I:U |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| path | Character Varying:I:U |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| type_task | Character Varying:N |
| type_task_id | BigInt:N |
| user_story | BigInt:N |
| time_spend | Double Precision:N |
| parent_id | BigInt:N |
| task_id | BigInt:I:U |
| id | BigInt:I:U |
| Field Name | Field Type |
|---|---|
| Character Varying:I:U | |
| password | Character Varying |
| name | Character Varying |
| emailConfirmed | Boolean |
| active | Boolean |
| id | BigInt:I:U |