Migrate all repos into monorepo context folders
Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Test-Script fuer Jira API Queries - Debugging
|
||||
#>
|
||||
|
||||
$JiraUrl = "https://arija.jaas.service.deutschebahn.com"
|
||||
$ApiBase = "$JiraUrl/rest"
|
||||
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$Token = Read-Host "Jira PAT"
|
||||
$Headers = @{ "Authorization" = "Bearer $Token"; "Content-Type" = "application/json" }
|
||||
|
||||
Write-Host "=== Test 1: Einfacher Name ==="
|
||||
$Jql = "assignee = 'Ana Cvitkovic' ORDER BY created ASC"
|
||||
$EncodedJql = [Uri]::EscapeDataString($Jql)
|
||||
$Uri = "$ApiBase/api/2/search?jql=$EncodedJql&maxResults=1&fields=created,summary"
|
||||
Write-Host " JQL: $Jql"
|
||||
Write-Host " URI: $Uri"
|
||||
try {
|
||||
$R = Invoke-WebRequest -Uri $Uri -Headers $Headers -UseBasicParsing -ErrorAction Stop
|
||||
$Data = $R.Content | ConvertFrom-Json
|
||||
Write-Host " OK: $($Data.total) Treffer" -ForegroundColor Green
|
||||
if ($Data.issues.Count -gt 0) {
|
||||
Write-Host " Erstes: $($Data.issues[0].key) - $($Data.issues[0].fields.created)"
|
||||
}
|
||||
} catch {
|
||||
Write-Host " FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
if ($_.Exception.Response) {
|
||||
$reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
|
||||
$body = $reader.ReadToEnd()
|
||||
Write-Host " Response: $($body.Substring(0, [Math]::Min(500, $body.Length)))" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== Test 2: Name mit Bindestrich ==="
|
||||
$Jql2 = "assignee = 'Dong-Won Han' ORDER BY created ASC"
|
||||
$EncodedJql2 = [Uri]::EscapeDataString($Jql2)
|
||||
$Uri2 = "$ApiBase/api/2/search?jql=$EncodedJql2&maxResults=1&fields=created,summary"
|
||||
Write-Host " JQL: $Jql2"
|
||||
try {
|
||||
$R2 = Invoke-WebRequest -Uri $Uri2 -Headers $Headers -UseBasicParsing -ErrorAction Stop
|
||||
$Data2 = $R2.Content | ConvertFrom-Json
|
||||
Write-Host " OK: $($Data2.total) Treffer" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host " FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
if ($_.Exception.Response) {
|
||||
$reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
|
||||
$body = $reader.ReadToEnd()
|
||||
Write-Host " Response: $($body.Substring(0, [Math]::Min(500, $body.Length)))" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== Test 3: Einfache Suche ohne Assignee ==="
|
||||
$Jql3 = "project = O2C404 ORDER BY created ASC"
|
||||
$EncodedJql3 = [Uri]::EscapeDataString($Jql3)
|
||||
$Uri3 = "$ApiBase/api/2/search?jql=$EncodedJql3&maxResults=1&fields=created,summary,assignee"
|
||||
Write-Host " JQL: $Jql3"
|
||||
try {
|
||||
$R3 = Invoke-WebRequest -Uri $Uri3 -Headers $Headers -UseBasicParsing -ErrorAction Stop
|
||||
$Data3 = $R3.Content | ConvertFrom-Json
|
||||
Write-Host " OK: $($Data3.total) Treffer" -ForegroundColor Green
|
||||
if ($Data3.issues.Count -gt 0) {
|
||||
$Assignee = if ($Data3.issues[0].fields.assignee) { $Data3.issues[0].fields.assignee.displayName } else { "unassigned" }
|
||||
Write-Host " Erstes: $($Data3.issues[0].key) - Assignee: $Assignee"
|
||||
}
|
||||
} catch {
|
||||
Write-Host " FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
if ($_.Exception.Response) {
|
||||
$reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
|
||||
$body = $reader.ReadToEnd()
|
||||
Write-Host " Response: $($body.Substring(0, [Math]::Min(500, $body.Length)))" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== Test 4: currentUser ==="
|
||||
$Jql4 = "assignee = currentUser() ORDER BY created ASC"
|
||||
$Uri4 = "$ApiBase/api/2/search?jql=$([Uri]::EscapeDataString($Jql4))&maxResults=1&fields=created,summary"
|
||||
try {
|
||||
$R4 = Invoke-WebRequest -Uri $Uri4 -Headers $Headers -UseBasicParsing -ErrorAction Stop
|
||||
$Data4 = $R4.Content | ConvertFrom-Json
|
||||
Write-Host " OK: $($Data4.total) Treffer" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host " FEHLER: $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
Reference in New Issue
Block a user