[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'accountId' must be the only user identifying query parameter in GDPR strict mode #342

Open
GZLiew opened this issue Apr 11, 2022 · 8 comments

Comments

@GZLiew
Copy link
Contributor
GZLiew commented Apr 11, 2022

Describe the bug

I was trying to assign a ticket to an user using the search box but was getting the following error

image
image

Please provide following details

  1. JiraCLI Version:
    0.3.0

  2. Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
    local use

  3. What operating system are you using? Also mention version.
    macOS Big Sur 11.5.1

  4. What terminal are you using? Also mention version.
    terminal

@ankitpokhrel
Copy link
Owner

@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 😬

@dtsyosh
Copy link
dtsyosh commented Apr 30, 2022

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.

@ankitpokhrel
Copy link
Owner

@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?

@GZLiew
Copy link
Contributor Author
GZLiew commented May 8, 2022

@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: guozhangliew@gmail.com
project:
  key: SOLID
  type: classic
server: https://demo.atlassian.net

@ankitpokhrel
Copy link
Owner

@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.

@GZLiew
Copy link
Contributor Author
GZLiew commented May 17, 2022

@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.

@adrian-gierakowski
Copy link

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

@GZLiew
Copy link
Contributor Author
GZLiew commented Nov 9, 2022

@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

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

No branches or pull requests

4 participants