/PlanningPoker

Connect to JIRA and estimate tickets in your team

Primary LanguageClojure

Planning Poker

What is this

I am playing with technology and trying new things. Because JIRA does not provide such functionality out of the box, I would like to develop SPA to play it with my team. I am aware about tons of similar products existing in this area (all are paid!), never seen any of them, and actually the work I do here is mostly for my personal skills development.

Project structure

Directory tree
==============
[-] PlanningPoker
 |--[+] __pycache__
 |--[-] backend                    <--- backed code
 |   |--[+] __pycache__
 |   |----- __init__.py
 |   |----- config.py
 |   `----- main.py                <---------------- main.py
 |--[+] planningpoker
 |--[-] pp-front                   <-- UIx project, created with:
 |   |--[+] dev                        npx create-uix-app@latest pp-front --re-frame`
 |   |--[+] node_modules
 |   |--[+] public
 |   |--[-] src
 |   |   `--[-] app
 |   |       |----- core.cljs      <--- function of FrontEnd
 |   |       |----- core.css
 |   |       |----- db.cljs
 |   |       |----- fx.cljs
 |   |       |----- handlers.cljs
 |   |       |----- hooks.cljs
 |   |       `----- subs.cljs
 |   |----- LICENSE.md
 |   |----- README.md
 |   |----- deps.edn
 |   |----- package.json
 |   |----- shadow-cljs.edn
 |   `----- yarn.lock
 |--[+] static
 |--[-] templates
 |   `----- index.html
 |--[+] tests
 |----- README.org                 <----- mode Source of this README.html
 |----- __init__.py
 |----- bb.edn                     <----- for commands
 |----- poetry.lock
 `----- pyproject.toml

Architecture & UI ideas [6/6]

  • [X] FastAPI on Backend
  • [X] UIX^2 on Frontend
  • [X] .env configuration
  • [X] Local memory caching for retrieved Jira data
  • [X] Websocket for group actions
  • [X] Logging screen on frontend (from websocket log)
    • [X] “Vote accepted from …”
    • [X] “User … logged in”

Install

Backend:

poetry install

Setup

Copy & edit contents of .env file: setup variables

cp .env-example .env

To do this you will need to create Google Project and obtain Oauth authorization keys.

Available settings

Variable nameDocumentation
GOOGLE_CLIENT_IDGoogle Oauth credentials
GOOGLE_CLIENT_SECRET
SECRET_KEYSecret key, must be specified
ALLOWED_EMAIL_DOMAINSRestrict domains list (for example list here only organization domains). If empty - all domains are allowed

Run

poetry run fastapi dev backend/main.py

(if you have babashka installed):

bb run fastapi

WORKING Work Log: Planning poker for Fieldhub

  • State “WORKING” from “IDEA” [2024-08-17 Sat 08:05]
  • State “IDEA” from “TODO” [2024-08-17 Sat 08:05]
  • State “TODO” from [2024-08-17 Sat 07:55]

WORKING improve planning poker after first try

  • State “WORKING” from [2024-10-06 Sun 08:20]

After first real play the improvements are in the list below.

Make ‘hours’ estimate default

  • State “DONE” from “TODO” [2024-10-06 Sun 09:45]
  • /home/oleksii/tmp/screenshots/ss_20240926122438_RSc3qSQN9YNV8wPEeV3i.png

Show voting reveived during voting

  • State “DONE” from “WORKING” [2024-10-07 Mon 08:25]
  • State “WORKING” from “TODO” [2024-10-06 Sun 20:40]
  • State “TODO” from [2024-10-06 Sun 08:30]
  • Show participant but do not show the vote
  • /home/oleksii/tmp/screenshots/ss_20240926125135_JTrDRyQU5bWqbFlIrkBf.png
  • [X] make sure that reload does not allow to vote again!

Reverse log

  • /home/oleksii/tmp/screenshots/ss_20240926124217_VIEMMApsf2CmDFWQsgqG.png

WORKING when all estimates are the same - set auto hours if all votes are the same

/home/oleksii/tmp/screenshots/ss_20240926130413_yPlps4vlIvc6F5aj9iCb.png

Add field to set estimate in ticket

  • /home/oleksii/tmp/screenshots/ss_20240926122916_tdqEOwzDyCVSWxwVgAGW.png

Technical design & architecture

  • State “DONE” from [2024-09-22 Sun 13:15]

View practically, Kit, Uix & bootstrap the project

  • State “DONE” from “WORKING” [2024-08-17 Sat 20:05]
  • State “WORKING” from “DONE” [2024-08-17 Sat 11:20]
  • State “DONE” from “TODO” [2024-08-17 Sat 11:15]
  • State “TODO” from [2024-08-17 Sat 07:55]
  • [X] Decided to use FastCGI instead of Kit in this round ([2024-08-17 Sat 11:20]). Reasons:
    • I already know how to use Jira integtration with Python
    • I want to gain some FastAPI experience
  • [X] How to add ReFrame? 11:29.44 (00:08) Found, explained in: https://github.com/pitch-io/uix-starter
    npx create-uix-app@latest my-app --re-frame # adds re-frame setup
        
  • [X] View (again) intro video from Roman Liutikov
  • [X] Re-try modern React tutorial
  • [X] Start learning Udemy React course, take some first lessons

use FastAPI! use Google auth & ready Jira integration I have!

  • State “DONE” from “TODO” [2024-08-25 Sun 15:05]
  • State “TODO” from [2024-08-17 Sat 08:10]

Use websocket for fast communication!

  • State “DONE” from “TODO” [2024-09-15 Sun 14:55]
  • State “TODO” from [2024-08-17 Sat 08:10]
  • FastAPI provides support:

REJECTED UI Plan on functional implementation [0/6]

  • State “REJECTED” from [2024-09-22 Sun 13:10]
  • State “TODO” from [2024-08-17 Sat 08:10]
  • SPA - one screen on UIx
  • [ ] List logged in users
  • [ ] Set color for facilitator?
    • how to agree who is facilitator? may be anyone can? probably yes, but then warn on top who started it
  • [ ] Countdown timer (configuration for length) starts
  • [ ] List of SPs (configuration)
  • [ ] Strike for users who voted
  • [ ] Reveal cards with some visual effect

Bootstrap: FastAPI + UIx^2 in one folder & dev/prod start/deploy/+sentry/+logging

  • State “DONE” from “TODO” [2024-08-25 Sun 07:05]
  • State “TODO” from [2024-08-17 Sat 08:20]
  • [X] Install fastapi via poetry
  • [X] Bootstrap UIX^2 project
  • [X] Add/commit to git
  • [ ] Publish on github

Google auth & JWT token (or session cookie)

  • State “DONE” from “TODO” [2024-08-25 Sun 07:05]
  • State “TODO” from [2024-08-17 Sat 08:25]

add running via bb.edn

  • State “DONE” from “WORKING” [2024-08-27 Tue 06:15]
  • State “WORKING” from “TODO” [2024-08-25 Sun 15:05]
  • State “TODO” from [2024-08-25 Sun 12:10]

fix burger menu for mobile

  • State “DONE” from “TODO” [2024-09-18 Wed 09:10]
  • State “TODO” from [2024-09-17 Tue 15:20]

use iframe for docs part

  • State “DONE” from “WORKING” [2024-09-17 Tue 20:45]
  • State “WORKING” from “TODO” [2024-09-17 Tue 14:30]
  • State “TODO” from [2024-09-17 Tue 09:35]

Search for ticket (Estimate ticket screen) [14/16]

  • State “TODO” from “DONE” [2024-09-16 Mon 20:40]
  • State “DONE” from “WORKING” [2024-09-15 Sun 15:15]
  • State “WORKING” from “TODO” [2024-08-25 Sun 15:05]
  • State “TODO” from [2024-08-25 Sun 07:05]

add jql: search support

  • State “DONE” from “TODO” [2024-09-15 Sun 15:30]
  • State “TODO” from [2024-09-08 Sun 12:55]

fix design=placement for estimate / results boxes

  • State “DONE” from “TODO” [2024-09-20 Fri 08:00]
  • State “TODO” from [2024-09-20 Fri 07:40]

logging

  • State “DONE” from “TODO” [2024-09-17 Tue 07:30]
  • State “TODO” from [2024-09-16 Mon 09:55]

Voting screen [15/15] [100%]

  • State “DONE” from “WORKING” [2024-09-22 Sun 13:10]
  • State “WORKING” from “TODO” [2024-09-05 Thu 09:25]
  • State “TODO” from [2024-08-28 Wed 23:25]
  • [X] Menu is-active
  • [X] Prepare FastAPI endpoint
  • [X] Cache ticket data
  • [X] Display data on screen
    • [2024-09-06 Fri 09:25] data is displayed but markdown formatting is required…
    • [X] format markdown (on backend?)
    • [X] format URLs via custom fn
    • [X] (maybe) format images as external URLs via custom fn?
      • got Permission denied!
  • [X] Add ‘vote’ layout block
  • [X] Set voted ticket & bg color for button
  • [X] Send vote data to server
    • [X] add backend endpoint
    • [X] add fx handler event
    • [ ] we also need to send POST on estimation start! we already have info
    • [X] send data only if value has changed!
  • [ ] Countdown timer for voting (configure the length via .env) no need, can be replaced by ‘finish’
  • [X] Indication who has started voting.
  • [X] Indication of people which finished voting - list. log
  • [X] Reveal results
  • [X] Fix red/yellow colors for big estimates, add for hours too
  • [X] Fix estimate restart
  • [X] Rewrite widget to split voting into 3 categories: Frontend, Backend and QA
    • [X] Splitting into categories in voting box & backend
    • [X] Splitting into categories in results box
    • [X] Make it possible to choose: SP or Hours
  • [X] Send results to Jira by adding formatted comment to ticket like (in hours):
    Back: ...
    Front: ...
    QA: ...
        
  • [X] How to reset use-state data when voting restarts?

check logged in state (when in /app) and other statuses (because currenly it allows to see /app/ [1/2]

  • State “DONE” from “TODO” [2024-09-17 Tue 20:50]
  • State “TODO” from “REVIEW” [2024-09-15 Sun 08:45]
  • State “REVIEW” from [2024-09-15 Sun 08:45]
  • [X] make ‘sync’ / ‘status’ query.

Websocket coordination [9/10]

  • State “DONE” from “TODO” [2024-09-22 Sun 09:50]
  • State “TODO” from [2024-08-28 Wed 23:25]