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

bug[JIRA]: Custom fields cannot display available values from autocompletedata/suggestions endpoint #23

Open
jeremyfiel opened this issue Dec 11, 2024 · 4 comments
Labels
bug Something isn't working JIRA This is related to JIRA server This is related to server products

Comments

@jeremyfiel
Copy link

When reviewing Related Jira Issues from a BB Server PR, the Jira issue UI will create a new tab in VSC. This seems to be working fine after the work around is applied from this comment https://bitbucket.org/atlassianlabs/atlascode/issues/756#comment-67516278

While working on the related Jira Issue, when I attempt to change the Feature Link custom field value, the endpoint http://{baseurl}/rest/api/2/jql/autocompletedata/suggestions?fieldName=Feature Link&fieldValue=25Q1 does not return any results because the actual field name is Epic Link, not Feature Link as displayed on the UI.

image

You can find the actual field names by calling https://<custom-jira-server>.com/rest/api/2/jql/autocompletedata

{
      "value": "\"Epic Link\"",
      "displayName": "Feature Link (Epic Link) - cf[10001]",
      "auto": "true",
      "orderable": "true",
      "searchable": "true",
      "cfid": "cf[10001]",
      "operators": [
        "=",
        "!=",
        "in",
        "not in",
        "is",
        "is not"
      ],
      "types": [
        "com.atlassian.jira.issue.Issue"
      ]
    },

This is a sample call from the current extension which does not return any results. It does not return any error either to inform the UI of no results found. The UI seems to hang while searching forever with Loading... displayed.

[2024-12-04 17:55:38:562]
curl -X GET "https://<custom-jira-server>.com/rest/api/2/jql/autocompletedata/suggestions?fieldName=Feature Link&fieldValue=25Q1" \
-H "Accept:application/json, text/plain, */*" \
-H "Content-Type:application/json" \
-H "User-Agent:atlascode/2.x axios/0.19.2" \
-H "X-Atlassian-Token:no-check" \
-H "Authorization:Bearer <apikey>"

If I manually call this api with the query modified with the correct field name, results are returned successfully.

curl -X GET 'http://{baseurl}/rest/api/2/jql/autocompletedata/suggestions?fieldName=Epic%20Link&fieldValue=25Q1'

I’m not sure if this is related to custom fields or not, but it’s not registering the correct field name when then url is generated.


Atlassian Bitbucket v8.19.10

Atlassian Jira Project Management Software (v9.12.15#9120015-sha1:4d9c4bd:jira-2)

Name: Jira and Bitbucket (Atlassian Labs)
Id: atlassian.atlascode
Version: 3.0.14
Publisher: Atlassian
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=Atlassian.atlascode

Windows 11

@sdzh-atlassian
Copy link
Member

Hi @jeremyfiel!

Thanks for carrying over the issue from bitbucket!

Looks like this might also have to do with the clients used in the extension going out of date?
We'll need to look into this one a bit more to say for sure

@sdzh-atlassian sdzh-atlassian added bug Something isn't working bitbucket This is related to Bitbucket labels Dec 11, 2024
@sdzh-atlassian
Copy link
Member

Ah, sorry, just went through the original discussion - looks like it's indeed the clients :(

Just to confirm - this specifically happens on Bitbucket server, right?
Not cloud or DC?

@jeremyfiel
Copy link
Author

jeremyfiel commented Dec 12, 2024

Yes, I'm using server but I think it's related to Jira, not BB.

@sdzh-atlassian sdzh-atlassian added JIRA This is related to JIRA server This is related to server products and removed bitbucket This is related to Bitbucket labels Dec 18, 2024
@sdzh-atlassian
Copy link
Member

Ah, of course, sorry - somehow I completely mislabeled the issue last week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working JIRA This is related to JIRA server This is related to server products
Projects
None yet
Development

No branches or pull requests

2 participants