Video tutorial for JIRA?

Chau March 16, 2017

Hello, i'm new to JIRA and seems to get lost in here.

Say if I want to do something simple, when user approve an issue, and the state is changed, I want to do some post action. Webhook? or Custom Post Script? Either one, is there a tutorial to "how to"?

 

Similar, we want to create a custom field in a custom tab, can we do so? How do we update that field from REST API? Seem too many links in here but I"m get lost. 

 

Can some one show me some detail tutorial ???

Thx

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2017

JIRA is very powerful and flexible - the price of that is it becomes complex to look after and configure all those clever things.

>when user approve an issue, and the state is changed, I want to do some post action.
I wish more people think the way you do.  It sounds like you have tried to read the docs, and mostly understood them, but you are not totally sure you have understood them.

You say "post action", which is very clear.  Someone does something to an issue that makes the status change and you want that to do something else. Yes, you want to add a "post function" or a "web hook" to that transition.  A web hook allows you to poke another system (e.g. "I closed this issue, poke the fridge to give me a beer as a reward").  Post-functions are more aimed at internal actions ("I closed this issue, go put a flag on issues linked to it"), but can do external calls, and all sorts of stuff if you need it to, and you are happy to code.

>create a custom field in a custom tab
Have a look at https://confluence.atlassian.com/jira064/configuring-fields-and-screens-720412098.html

>How do we update that field from REST API
The REST API does not care about screen layout.  A custom field is there to be filled in, REST lets you do that.  The tabs don't matter, they're only for humans using the gui.

Chau March 16, 2017

Thanks Nic,

Say if we want to pursue "post script function" at the transition level using groovy script, how would I about to do so? Is there step by step tutorial/doc? Also, how do I develop and debug that script then display the console output?

As my scenario, when someone approve and change the state in an issue from "DEV" to "QA", then we would like JIRA to execute this post script and execute a REST API call to "poke" other system, like Jenkins to execute a job. How can i do so?

Thx 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2017

There's some getting-started stuff at https://scriptrunner.adaptavist.com/4.3.9/jira/quickstart.html

However, if you just need a REST call, you might want to look at https://confluence.atlassian.com/adminjiraserver070/managing-webhooks-749382683.html rather than writing a script, as the webhook might be able to do the whole thing for you.

Chau March 17, 2017

Thanks Nic,

I scan through the Adaptavist ScriptRunner doc, and don't see anywhere to instruct a REST API call to external system?

 

From the second webhook link, sound like it shows how to configure webhook to JIRA but assuming we already have webhook. Does it show how to develop one? Or there is a template or simple one from Atlassian?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2017

Sorry, I don't understand - if you have a webhook already, then it's working surely?

I'm not sure I remember seeing a doc on writing REST calls in ScriptRunner, as for the most part, people would use webhooks instead

Suggest an answer

Log in or Sign up to answer