Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Tempo Timesheet - Java API to set the account field in a worklog

Hi,

 

We are scratching our head here.
We are using Tempo Timesheets, configured with an account worklog attribute.
What is the api to set this account

 

Context

Check the exalate community post 
There is a specific use case where Account information needs to be synced between 2 jira servers.

1 answer

Hi Francis,

can I ask you why you are not using the REST API instead?

BR

Hi Alexander,

the REST API would be fine if we would not need to write the Basic Auth credentials into the script. Is there a way to get the credentials of the user executing the groovy script and use those to call the REST API?

Best Regards,
Daniel

Like francis likes this

Hi Daniel,

you should refer to this script. So something like:

def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def credentials = ComponentAccessor.userPropertyManager.getPropertySet(loggedInUser).getString(userPropertyKey)

As you run the script as a certain user you need to make sure that this user has the correct permissions in Tempo.

Hope that helps 

BR

Hi Alexander, 

thank you, this looks perfect. I will try this approach.

Like Alexander Eck _Tempo_ likes this

Hi Alexander,

as far as I can see we would still need to write the plaintext Passwort into the user-defined property in Jira in order to use the REST API with Basic Auth. Is this correct?

Users would not be able to change their Passwords themselfs (without breaking the Authentication) and the plaintext Password would still be visible to at least the admins as well. Is there no other way to authenticate?

Would App Links and OAuth be an Option? https://scriptrunner.adaptavist.com/latest/bitbucket/interacting-with-other-apps-via-applinks.html

best regards

Daniel,

that is beyond my knowledge. But as far as I know you don´t need to save the password as plain text in a User property. Maybe some more advances Groovy experts out there that can possibly answer that question. Still best way is to try it out.

BR

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

312 views 9 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you