customize tempo worktypes using REST endpoint and scriptrunner

Hi, As per Scriptrunner documentation, we can customize the work type dropdown using REST endpoint.

I have a question regarding this functionality, Can I customize the worktypes based on a JIRA custom field? i.e for issue A-123, the worktype dropdown will have values A,B,C but for other issue the values will differ?

Thanks

Vidula

2 answers

0 vote

I'm guessing this is in relation to: https://scriptrunner.adaptavist.com/latest/jira/working-with-tempo.html ?

If so, according to the tempo doc, you should be able to configure the URL like:

/blah/custom/do-dropdown?issueKey={IssueKey}

Then in the code you should be able to access that by:

queryParams.getFirst("issueKey")

 


 

 

Yes, I have got that working via URL. But I am not sure how do I call this service when a JIRA issue is created.

The idea is to pass the 'issue' object and depending on some custom field change the available options in work type dropdown when I log work.

I tried creating a JIRA webhook (issue created event) but that didnt change the work type options in 'log work' screen.

You should maybe talk to tempo support, because my answer does exactly that. You get the issue key, and depending on its type or whatever else you present different worklog options.

Got it working. I did not add the REST endpoint URL to Tempo (worklog attribute script URL). Thanks Jamie.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

176 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you