Hi Team,
Im trying run an api call from the postfunction to get fields data. but the downside is we cant use the hard coded / basic auth due too restrictions. can we make use of current user to run the API.
Hi @Gagan
Use ComponentAccessor to get logged in user and IssueManager to perform any activity on Issue using that user who is performing either transition or any relevant action.
https://community.atlassian.com/t5/Jira-questions/How-to-get-current-user-in-jira-application/qaq-p/818002
Thanks,Pramodh
Hello @Pramodh M ,
i need to get the json of the fields data (like type etc) which we get from /rest/api/2/field.
But to do so it needs authentication and for the auth i need to make use current user. as this call is run by admins only.
i cannot hard code the creds to the code.
It looks like you're new here. Sign in or register to get started.