Skip to content

TR-22340: Automation_ID automatic field creation - #472

Open
acuanico-tr-galt wants to merge 2 commits into
feature/TR-21906from
feature/TR-22340
Open

acuanico-tr-galt wants to merge 2 commits into
feature/TR-21906from
feature/TR-22340

Conversation

@acuanico-tr-galt

Copy link
Copy Markdown
Contributor

Solution description

Allow TRCLI to automatically create automation_id field for easier user onboarding.

Changes

TRCLI now creates the field via API when it detects that automation_id field is missing, also permission-denied message is displayed for unauthorized users. Also explicit confirmation is needed before field creation.

Files changed/updated:

  • trcli/api/case_field_handler.py — CaseFieldHandler.add_case_field()
  • trcli/api/api_request_handler.py — add_automation_id_field(), automation_id_field_exists()
  • trcli/constants.py — only the FAULT_MAPPING["automation_id_creation_permission_denied"] / ["automation_id_creation_failed"], also the PROMPT_MESSAGES["create_automation_id_field"]
  • trcli/api/project_based_client.py — 403-branch inside _check_or_create_automation_id_field(),

Potential impacts

None.

Steps to test

  1. TestRail project and instance must not have automation_id created.
  2. User uploads test results as normal
  3. TRCLI should be able to detect automation_id and ask user for confirmation to create.

PR Tasks

  • PR reference added to issue
  • README updated
  • Unit tests added/updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant