In order to learn how to use python-taiga lib, I wrote a little program to get my projects US.
I found that for my 2nd project, status of US (that are numeric/int) began at 16 (instead of 1 in 1st project).
So I can't map US statuses in script (see commented line below).
Steps to reproduce
Using this code:
The code:
from taiga import TaigaAPI
# Taiga constants
TAIGA_USERNAME = "my_mail_address@test.com"
TAIGA_PASSWORD = "my_taiga_password"
TAIGA_INSTANCE_URL = "http://localhost:9000"
def connect_taiga():
api = TaigaAPI(
host=TAIGA_INSTANCE_URL
)
api.auth(
username=TAIGA_USERNAME,
password=TAIGA_PASSWORD
)
return api
api = connect_taiga()
project_list = api.projects.list()
for project in project_list:
print(f'name: {project.name} / description: {project.description}')
us_list = project.list_user_stories()
status_list = project.list_user_story_statuses()
for status in status_list:
print(f'status => {status.name}, color => {status.color}, order => {status.order}')
for us in us_list:
# status = status_list[us.status]
print(f'subject: {us.subject} / status: {us.status}')
Produces this output:
C:\WINDOWS\system32>python C:\Apps\Tools\myBoard\myBoardTest.py
name: Projects / description: Personnal projects
status => New, color => #70728F, order => 0
status => Ready, color => #E44057, order => 1
status => In progress, color => #E47C40, order => 2
status => En attente / bloqué, color => #AC51D3, order => 3
status => Ready for test, color => #E4CE40, order => 4
status => Done, color => #A8E440, order => 5
status => Archived, color => #A9AABC, order => 6
subject: task 1 / status: 5
subject: task 2 / status: 2
subject: task 3 / status: 5
subject: task 4 / status: 1
name: Home / description: Home tasks
status => New, color => #70728F, order => 1
status => Ready, color => #E44057, order => 2
status => In progress, color => #E47C40, order => 3
status => Ready for test, color => #E4CE40, order => 4
status => Done, color => #A8E440, order => 5
status => Archived, color => #A9AABC, order => 6
subject: task 1 / status: 17
subject: task 2 / status: 16
subject: task 3 / status: 16
subject: task 4 / status: 16
It seems that when retrieving informations from project Home from UI (seen with development tools in chrome / F12), there is a "default_us_status": 16, field set in JSON response.
Maybe this value have to be substracted +1 to 'status' values ?
Description
In order to learn how to use python-taiga lib, I wrote a little program to get my projects US. I found that for my 2nd project, status of US (that are numeric/int) began at 16 (instead of 1 in 1st project). So I can't map US statuses in script (see commented line below).
Steps to reproduce
Using this code: The code:
Produces this output:
Versions
"docker compose" version, images versions are:
file
docker-compose.yml
:docker versions:
Expected behaviour
Result should be:
Actual behaviour
Additional information
It seems that when retrieving informations from project
Home
from UI (seen with development tools in chrome / F12), there is a"default_us_status": 16,
field set in JSON response.Maybe this value have to be substracted +1 to 'status' values ?