Showing posts with label Jira Adapter. Show all posts
Showing posts with label Jira Adapter. Show all posts

Tuesday, July 5, 2022

#915 OIC Jira Adapter - Add Attachments etc.

Use case here is simple, something goes wrong, I need to create an Issue in Jira. I then need to add an attachment and a comment to the aforementioned. 

So simple stuff here. I am using my trial Jira account -


















I will be using the following Authorization method, when creating the Jira connection in OIC - 



















This requires client id and secret - these I get by creating an app in atlassian - https://developer.atlassian.com/ 


































Click on Authorization -



































Enter your OIC callback url - format is https://yourOICInstance:443/icsapis/agent/oauth/callback
















Click on Settings to see client id and secret - 

























You will use these when creating the connection in OIC.
Final thing you need to do here is select the Permissions -  what you want OIC to be able to do.


















I check all the Jira boxes -














































Create the OIC JIRA Connection 


Now to OIC - Create the Jira Connection - Please note - the Scope entries are NOT optional here.

























Now to using the connection in a simple integration - here I create an issue add a comment and attach a file.

Create the Integration


The integration is app driven with a REST Trigger, configuration as follows -





























Next step is to create the Issue -

Create Jira Issue/ticket




















Mapping - 


 























Next step is to add the Attachment -

Add Attachment to Jira Issue/ticket

I retrieve the file from an FTP server and then invoke the Jira adapter.
Adapter configuration is as follows - 
















Mapping is as follows - First I set the id -





then the file reference -






Note: you also need to set the following target field - value is "file"






























Add Comment to Jira Issue/ticket

Same modus operandi - I won't go into the gory details - 












Test it!




Check out Jira - 











Friday, April 30, 2021

#844 OIC May 21 Release - New Jira adapter

 








The Hare of the Dog Pub has adopted Jira to sort out the multifarious issues it faces serving its punters.

The plan is to offer a REST api to the Hare of the Dog's mobile app developers, that will enable them to produce a state of the art UI for the drinkers of Harmonstown. This will allow customers to raise bugs against the pub.

OIC May 21 comes with a Jira adapter - so let's test this out - 

First step is to generate an API token in Jira - 





















































Now to OIC...the api token will be used as password, when defining the Jira connection. 























Now to leveraging this connection in an integration - 

This is a REST triggered orchestration, with the following request payload - 














Here is the mapping - 












Now to a simple test -








Check in Jira - 












Here's the response returned by the integration -






id is 10008

key is CLEAN-2

Let's look at the other functionality supported by the adapter -

Assign Issue 








I need to map the user id from Jira to the accountId field - 

My user's Jira userid is - included in the url below - 










I just hard code this in the OIC mapper - naturally the issue id is available in the response from Create Issue -









Test and validate in Jira - Bug has been assigned to me -






Get Users















The key again is the user accountId, I map an test -