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

Get only visible fields #1898

Open
nitrocode opened this issue Sep 19, 2024 · 2 comments
Open

Get only visible fields #1898

nitrocode opened this issue Sep 19, 2024 · 2 comments

Comments

@nitrocode
Copy link

nitrocode commented Sep 19, 2024

Problem trying to solve

I want to be able to set custom fields as required in jira tickets but only if that field is exposed in the UI.

For PLATFORM project tickets, the field may be editable and in GRAPH project the field may not be editable.

At the moment, I use the following

jira = JIRA('https://org.atlassian.net/', basic_auth=(jira_user, jira_token))
issue = jira.issue(ticket)
issue.fields

and issue.fields returns all the fields

There is also

meta = jira.editmeta(ticket)

However, this also shows me all the fields.

If the field does not have a value or is uneditable, the value will default to None which isn't helpful.

Possible solution(s)

Looking for one.

Maybe it can figure out the project name, check the view of the project, see what fields are exposed, and then we'll know which fields are editable.

Alternatives

  • We create tickets in the project where all these fields are exposed
  • We expose these fields in all views

Additional Context

@Zhengchai
Copy link

vote for this issue also, please consider to add the *navigable support during the search_tickets(fields=*navigable) etc.

@nitrocode
Copy link
Author

There does seem to be a way to do this but you need administrator privileges in order to access the jira screens, then you can get the screen for the project, and finally retrieve all the visible fields. It's possible that jira doesn't output the visibility unless navigating to screens.

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

No branches or pull requests

2 participants