jira-cli
jira-cli copied to clipboard
'accountId' must be the only user identifying query parameter in GDPR strict mode
Describe the bug
I was trying to assign a ticket to an user using the search box but was getting the following error
Please provide following details
-
JiraCLI Version: 0.3.0
-
Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation. local use
-
What operating system are you using? Also mention version. macOS Big Sur 11.5.1
-
What terminal are you using? Also mention version. terminal
@GZLiew How can I enable "GDPR strict mode" in Jira? Is it an option in the UI or hardcoded in config somewhere by Atlassian? I couldn't find proper details on this 😬
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/
@ankitpokhrel
This is due to these changes.
When I try to assign to other users I can, this error just occurs when I try to assign an issue to me.
@dtsyosh I wonder why I can't reproduce this in my installation (both cloud and on-premise). Unless there is some config to enable the "GDPR strict mode", I should be easily able to reproduce this right?
@ankitpokhrel is there a verbose setting I can turn on so I can share you the logs while running the cli? heres the config im using.
board:
id: 24
name: Developer board
type: kanban
epic:
name: ""
link: ""
installation: Local
issue:
types:
- id: "10031"
name: Component
handle: Component
subtask: false
- id: "10030"
name: Infrastructure
handle: Infrastructure
subtask: false
- id: "10004"
name: Bug
handle: Bug
subtask: false
- id: "10033"
name: Security Issue
handle: Security Issue
subtask: false
login: [email protected]
project:
key: SOLID
type: classic
server: https://demo.atlassian.net
@GZLiew does user assign work directly with jira issue create --assignee <email or display name>
?
is there a verbose setting
There is a --debug
option but I don't think that would be useful in this case.
@ankitpokhrel nope any way of assigning doesnt work for me currently
Im trying to assign it to myself below
? Assign to user: Liew Guo Zhang
â ¹ Assigning issue "TAIO-5094" to user "Liew Guo Zhang"...
REQUEST DETAILS
------------------------------------------------------------
PUT /rest/api/2/issue/TAIO-5094/assignee HTTP/1.1
Host: ******.atlassian.net
Accept: application/json
Authorization: Basic ******==
Content-Type: application/json
RESPONSE DETAILS
------------------------------------------------------------
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Atl-Traceid: *********
Cache-Control: no-cache, no-store, no-transform
Content-Type: application/json;charset=UTF-8
Date: Tue, 17 May 2022 00:29:41 GMT
Expect-Ct: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/atlassian-proxy", max-age=86400
Nel: {"report_to": "endpoint-1", "max_age": 600, "include_subdomains": true, "failure_fraction": 0.001}
Report-To: {"group": "endpoint-1", "max_age": 600, "endpoints": [{"url": "https://dj9s4kmieytgz.cloudfront.net/"}], "include_subdomains": true}
Server: globaledge-envoy
Set-Cookie: atlassian.xsrf.token=******-d76a-4d53-a73d-4f88a8c1297b_6bf7839088951451465322e8482e873f5e9b16b2_lin; path=/; SameSite=None; Secure
Strict-Transport-Security: max-age=63072000; preload
Timing-Allow-Origin: *
X-Aaccountid: 70121%3A651943e3-914a-4976-a60f-19057b16990b
X-Arequestid: 9e67a909-28b8-45ed-bd0e-54f478ad23ad
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 231
X-Xss-Protection: 1; mode=block
Error:
- 'accountId' must be the only user identifying query parameter in GDPR strict mode.
jira: Received unexpected response '400 Bad Request'.
Please check the parameters you supplied and try again.
just to confirm this comment
the following worked for me:
curl --verbose -H "Authorization: Basic $TOKEN" -H "Content-Type: application/json" 'https://'$HOST'.atlassian.net/rest/api/2/issue/DEVOPS-35/assignee' -X PUT --data '{ "accountId": "'$ACCOUNT_ID'" }'
with the TOKEN value obtained from logs output by:
jira issue assign $ISSUE_ID $MY_USER_NAME --debug
and ACCOUNT_ID obtained as described here
@ankitpokhrel I finally found the issue. it was because Im using local installation which points to the V2 api instead of V3. I am able to assign to users now