SlideShare a Scribd company logo
1 of 33
Download to read offline
APEX connects Jira
Oliver Lemm
APEX World
07.03.2016
Facts & Figures
Independent Technology House
with Cross-Industry Expertise
Headquarter
Ratingen
(North Rhine – Westphalia)
240
Employees
Founded
1994
Branches
Dortmund, Cologne,
Frankfurt
Top Company
for Trainees &
Students
Privately-
Owned
Corporation
Oracle
Platinum
Partner
24 Mio. Euro
Revenue
2
about me
§ Oliver Lemm
§ since february 2007 working for MT AG in Ratingen
§ Junior Consultant > Consultant > Senior Consultant
> Competence Center Leader APEX & Service Center Leader APEX
§ Diploma applied computer science at the university of Duisburg-Essen
§ Projectleader, IT-Architect and Developer
§ working with Oracle Databases and Oracle Application Express since 2007
§ Blog http://oliverlemm.blogspot.de
§ Twitter https://twitter.com/OliverLemm
3
Agenda
1. Motivation
2. Jira
3. Webservices
4. JSON
5. Livedemo
4
Motivation
„Working with one tool to handle the developing process,
controlling and all other processes in one project“
„Calculating key figures based on Jira values which are not delivered by Jira itself.“
„Using integrated Jira Plugins and adding additional
functionality by using APEX as known technology“
5
requirements
Jira
§ https://www.atlassian.com/JIRA
§ Issue tracking and code integration
§ Supporting Dashboards & Plugins
§ perfect integration from Confluence (wiki)
and Subversion (versioning)
§ supporting complex workflows
§ Issue import from Bugzilla, Mantis, GitHub, …
§ Supporting von REST-Webservices
6
7
Jira
8
Workflow
Jira
§ supporting a huge number of attributes
§ time tracking (estimated, time spent, remaining)
§ Components (can be used for APEX pages and database objects)
§ versions
§ fields and screens adjustable per project
§ external issue numbers, date of commision, date of payment
§ Supporting own workflows
§ Describing a whole process, usable for non developing processes
§ Every step can be defined by user rights or issue dependencies
§ Using „JIRA Timesheet Reports and Gadgets Plugin“
9
Integrated features
Jira
§ key figures not in desired aggregation
§ time per year/month
§ no further support for SOAP Webservices in Jira
§ SOAP Interface doesn‘t return all values
§ Using Jira-Plugins
§ Listed Plugins not fullfilling all requiremends
§ Developing own Jira-Plugins is complex and time consuming
10
lack of features
Jira
§ API documentation for Jira REST-Webservices
https://docs.atlassian.com/jira/REST/latest/
§ URL structure
§ http://host:port/context/rest/api-name/api-version/resource-name
§ Using an issue identfiied by the key JRA-9 would be like:
§ https://jira.atlassian.com/rest/api/latest/issue/JRA-9
§ Using JQL Language (syntax)
https://jira.mt-ag.com/rest/api/2/search?jql=project=BP
§ Returning values in JSON Format (testable also in browser)
11
REST-Webservice
Jira
12
JQL
https://jira.mt-ag.com/rest/api/2/search?jql=project=BP
Jira
§ addional information when getting REST-Webservice Result
§ Default max 50 entries
§ 1. solution: add parameter &maxResults=XXX
§ 2. solution: add Parameter &startAt=50
§ Sort the results
§ If no Authentication needed, don‘t submit username/password -> you get Unauthorized
(401)
13
REST-Webservice
"expand":"schema,names","startAt":0,"maxResults":50,"total":827,"issues":[….]}
https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP&maxResults=1000
https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP&startAt=50
https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP+order+by+duedate
Webservices
§ getting Error:
§ Example: https://jira.atlassian.com/rest/api/latest/issue/JRA-9
14
ACL
ORA-29273: HTTP request failed
ORA-24247: network access denied by access control list (ACL)
begin
dbms_network_acl_admin.create_acl(acl => 'jira.atlassian.com.xml'
,description => 'An ACL for Calling REST Webservices.'
,principal => l_principal
,is_grant => true
,privilege => 'connect'
,start_date => systimestamp
,end_date => null);
dbms_network_acl_admin.assign_acl(acl => 'jira.atlassian.com.xml'
,host => 'jira.atlassian.com'
,lower_port => 443
,upper_port => 443);
commit;
end;
Webservices
§ Getting existing ACL Entries
§ Important for ACL
§ Using Web Service References (shared
components or the APEX_WEB_SERVICE
(package)
§ principal = APEX_050000
§ using utl_http or other packages calling
external resources
§ principal = my_schema_name
15
ACL select a.acl
,a.host
,a.lower_port
,a.upper_port
,p.principal
,p.privilege
,p.is_grant
,to_char(p.start_date
,'DD-MON-YYYY') as start_date
,to_char(p.end_date
,'DD-MON-YYYY') as end_date
from dba_network_acl_privileges p
left join dba_network_acls a on a.acl = p.acl
Webservices
16
exporting certificate
Webservices
§ calling https:
§ To solve this problem, you have to get the certificates which are used by the server which
runs Jira
§ Getting certificate
§ use your browser and call the URL from the REST-Webservice or even from Jira
§ click on the lock symbol
§ click show certificate
17
exporting certificate
ORA-29273: HTTP request failed
ORA-29024: Certificate validation failure
Webservices
18
importing certificate
Webservices
§ use the Oracle Wallet Manager (OWM) to import the certificate
§ run ORACLE_HOMEbinowm.cl (on windows a link is created)
§ Import of the certificate is also possible using the command line
§ create a wallet for the certificate using a path like this
ORACLE_BASEadmin<SID><name_wallet>
§ Use automatic login for your wallet (otherwise you have to use the wallet always with your
password in your plsql code)
19
importing certificate
Webservice
§ APEX documentation
http://docs.oracle.com/cd/E59726_01/doc.50/e39151/adm_wrkspc002.htm#BABHEHAG
§ Login into your INTERNALWorkspace
ØManage Instance
ØInstance Settings
ØWallet
20
certificate in APEX
Webservices
§ still getting error like:
§ The ACL Syntax has been changed so look up changed ACL behavior for 12c.
21
12c
ORA-29273: HTTP request failed
ORA-12541: TNS:no listener
Webservices
§ Shared Components
§ Web Service References
§ Create
§ Problems
§ based on single items
§ authentification
§ result as CLOB
only in Collection.
No support in
§ apex_items
§ report columns
§ JSON Format
22
Web Service Reference
Webservices
23
Web Service Reference
Webservice
§ Call REST
§ p_http_method GET, HEAD, POST, PUT, DELETE
§ Username & Password supporting Basic Authentication
§ Parameter if parameter beside the URL itself are needed
24
APEX_WEB_SERVICE
l_clob := apex_web_service.make_rest_request(
p_url => 'https://jira.atlassian.com/rest/api/latest/issue/JRA-
9'
,p_http_method => 'GET'
,p_wallet_path => 'file:C:oracleadminorclmein_wallet'
,p_username => 'lemmo'
,p_password => '123456 '‚
,p_parm_name => apex_util.string_to_table('param1:param2'),
,p_parm_value => apex_util.string_to_table('val1:val2')
);
JSON
§ Datentypen
§ String
§ "QS - Demo Feature"
§ "2015-11-03T13:48:16.630+0100"
§ Number
§ 20
§ Boolean
§ true / false
§ Null
§ null
§ Array
§ [ {…}, {…}]
25
format
{
"id": "17149",
"self": "https://jira.mt-ag.com/rest/api/latest/issue/17149",
"key": "BP-7",
"fields":
{
“summary": "QS - Demo Feature",
"progress":
{
"progress": 19800,
"total": 19800,
"percent": 100
},
"created": "2015-11-03T13:48:16.630+0100",
worklog": {
"startAt": 0,
"maxResults": 20,
"total": 2,
"worklogs": [
{ ... },
{ ... }
]
}
}
}
JSON
§ convert clob
to JSON object
§ looping entries
§ get value
26
processing
l_values apex_json.t_values;
….
apex_json.parse(p_values => l_values
,p_source => l_clob);
for i in 1 .. apex_json.get_count(p_values => l_values
,p_path => '.')
loop … end loop
l_jira_issue.key := apex_json.get_varchar2(p_values => pi_json_issue
,p_path => 'key');
l_jira_issue.timespent := apex_json.get_number(p_values => pi_json_issue
,p_path => 'fields.timespent');
JSON
§ Number as String
§ you have to convert
§ Datetime as String
§ Converting with
apex_json.get_date
doesn‘t work because
of format
§ custom fields
in Jira are named like
customfield_xxxxx
27
special cases
"id": "17149"
"created": "2015-11-03T13:48:16.630+0100"
l_timestamp := to_timestamp_tz(pi_string
,'YYYY-MM-DD"T"hh24:mi:ss.FF3TZHTZM');
l_string := to_char(l_timestamp
,'yyyy.mm.dd hh24:mi:ss');
l_date := to_date(l_string
,'yyyy.mm.dd hh24:mi:ss');
apex_json.get_varchar2(p_values => pi_json_issue
,p_path => 'fields.customfield_10000');
JSON
§ Time worked / Worklog not with information by day encapsuleted in issue
§ you have call the worklog for every single ticket by one REST Call
28
special cases
for i in 1 .. apex_json.get_count(p_values => l_values, p_path => 'issues')
loop
l_rest_response := make_rest_request(pi_url => pi_jira_base_url || c_jira_rest_base_path || '/issue/' ||
apex_json.get_varchar2(p_values => l_values, p_path => 'issues[' || i || '].key')
,pi_username => pi_username
,pi_password => pi_password);
apex_json.parse(p_values => l_values_issue, p_source => l_rest_response);
l_jira_issue := get_issue_from_json(pi_json_issue => l_values_issue);
for j in 1 .. apex_json.get_count(p_values => l_values_issue
,p_path => 'fields.worklog.worklogs')
loop
l_jira_issue_worklog := get_issue_worklog_from_json(pi_json_issue_worklog => l_values_issue
,pi_path => 'fields.worklog.worklogs[' || j || '].'
,pi_jira_issue_id => l_jira_issue.id
,pi_jira_issue_key => l_jira_issue.key);
pipe row(l_jira_issue_worklog);
JSON
§ transform JSON into type
§ easier to use
§ Transformation in package instead APEX
§ testing possible by using sql
§ Entities defined as column names
§ documentation von
CollectionSpalte – JSON – Spaltenname im Type
§ using table function based on defined types
29
processing create or replace type t_jira_issue force as object
(
-- { id: "16276"
-- c001
id number, -- Jira Issue ID
-- { self: https://jira.mt-
ag.com/rest/api/2/issue/16276
-- c003
url_json varchar2(32767), -- c003 - JSON URL
-- { key: "UITFPP-1057„
-- c001
key varchar2(32767), -- Issue Key
select *
from table(jira_rest_ws_pkg.get_projects(pi_base_url => 'https://jira.atlassian.com'))
APEX
§ using APEX_COLLECTIONS
§ not every search means new webservice call
§ loading page doesn‘t call a webservice
§ APEX itself relies also on collections when working with Web Service References
§ problem authentication for webservice call
§ every call needs a username & password
§ using Web Service Reference it‘s inconvenient
§ using Application Items instead
§ when logging into the apex application password is saved on server-side by application item
§ attention the password value is visible in session state
30
APEX
31
Live demo
Conclusion
§ complexity is huge because of many different technical aspects
§ all important key facts are calculateable
§ transforming JSON in JavaScript or PL/SQL is not easy in the beginning
§ first time parsing JSON even with APEX_JSON needs practice
remember in 12c you can directly parse JSON by SQL
§ Using APEX integrated „Web Service Reference“ only for simple examples
32
@OliverLemm
http://oliverlemm.blogspot.de
http://de.linkedin.com/in/OliverLemm
https://www.xing.com/profile/Oliver_Lemm
Questions?

More Related Content

What's hot

JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
Atlassian
 
How to Troubleshoot & Optimize Database Query Performance for Your Application
How to Troubleshoot  & Optimize Database Query Performance for Your ApplicationHow to Troubleshoot  & Optimize Database Query Performance for Your Application
How to Troubleshoot & Optimize Database Query Performance for Your Application
Dynatrace
 

What's hot (20)

JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
 
JavaScript straight from the Oracle Database
JavaScript straight from the Oracle DatabaseJavaScript straight from the Oracle Database
JavaScript straight from the Oracle Database
 
Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017
 
Ow
OwOw
Ow
 
O365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administratorsO365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administrators
 
SOA Suite 12c Customer implementation
SOA Suite 12c Customer implementationSOA Suite 12c Customer implementation
SOA Suite 12c Customer implementation
 
BPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to ActivitiBPM-4 Migration from jBPM to Activiti
BPM-4 Migration from jBPM to Activiti
 
Oracle SOA Suite for High availability Enterprises
Oracle SOA Suite for High availability EnterprisesOracle SOA Suite for High availability Enterprises
Oracle SOA Suite for High availability Enterprises
 
Overview of Oracle Product Portfolio (focus on Platform) - April, 2017
Overview of Oracle Product Portfolio (focus on Platform) - April, 2017Overview of Oracle Product Portfolio (focus on Platform) - April, 2017
Overview of Oracle Product Portfolio (focus on Platform) - April, 2017
 
SPCA2013 - Windows Azure for SharePoint People
SPCA2013 - Windows Azure for SharePoint PeopleSPCA2013 - Windows Azure for SharePoint People
SPCA2013 - Windows Azure for SharePoint People
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Oracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google AppsOracle Application Express as add-on for Google Apps
Oracle Application Express as add-on for Google Apps
 
AlwaysOn Availability Group Job Management
AlwaysOn Availability Group Job ManagementAlwaysOn Availability Group Job Management
AlwaysOn Availability Group Job Management
 
WebLogic on ODA - Oracle Open World 2013
WebLogic on ODA - Oracle Open World 2013WebLogic on ODA - Oracle Open World 2013
WebLogic on ODA - Oracle Open World 2013
 
How to Troubleshoot & Optimize Database Query Performance for Your Application
How to Troubleshoot  & Optimize Database Query Performance for Your ApplicationHow to Troubleshoot  & Optimize Database Query Performance for Your Application
How to Troubleshoot & Optimize Database Query Performance for Your Application
 
Getting Started, Low Hanging Fruit: Our First Experiences with Oracle Managem...
Getting Started, Low Hanging Fruit: Our First Experiences with Oracle Managem...Getting Started, Low Hanging Fruit: Our First Experiences with Oracle Managem...
Getting Started, Low Hanging Fruit: Our First Experiences with Oracle Managem...
 
5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about Microservices5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about Microservices
 
TestMaker Object Designer Training - Basics
TestMaker Object Designer Training - BasicsTestMaker Object Designer Training - Basics
TestMaker Object Designer Training - Basics
 
Oozie @ Riot Games
Oozie @ Riot GamesOozie @ Riot Games
Oozie @ Riot Games
 

Viewers also liked

Using JIRA & Greenhopper for Agile Development
Using JIRA & Greenhopper for Agile DevelopmentUsing JIRA & Greenhopper for Agile Development
Using JIRA & Greenhopper for Agile Development
Jeff Leyser
 
JIRA-An intro
JIRA-An introJIRA-An intro
JIRA-An intro
Asha G.K.
 

Viewers also liked (10)

Jira
JiraJira
Jira
 
Managing Product Growth Experiments With JIRA and Confluence - Zane Salim
Managing Product Growth Experiments With JIRA and Confluence - Zane SalimManaging Product Growth Experiments With JIRA and Confluence - Zane Salim
Managing Product Growth Experiments With JIRA and Confluence - Zane Salim
 
Jira plugin dev introduction 14012014 a
Jira plugin dev introduction 14012014 aJira plugin dev introduction 14012014 a
Jira plugin dev introduction 14012014 a
 
Jira Agile
Jira AgileJira Agile
Jira Agile
 
Agile Overview Session
Agile Overview SessionAgile Overview Session
Agile Overview Session
 
Using JIRA & Greenhopper for Agile Development
Using JIRA & Greenhopper for Agile DevelopmentUsing JIRA & Greenhopper for Agile Development
Using JIRA & Greenhopper for Agile Development
 
JIRA-An intro
JIRA-An introJIRA-An intro
JIRA-An intro
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
Introduction To Jira
Introduction To JiraIntroduction To Jira
Introduction To Jira
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 

Similar to 20160307 apex connects_jira

Similar to 20160307 apex connects_jira (20)

6 tips for improving ruby performance
6 tips for improving ruby performance6 tips for improving ruby performance
6 tips for improving ruby performance
 
Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
StackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStackStackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStack
 
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
20180605 sso with apex and adfs the weblogic way
20180605 sso with apex and adfs the weblogic way20180605 sso with apex and adfs the weblogic way
20180605 sso with apex and adfs the weblogic way
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles ServiceAraport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Bh Win 03 Rileybollefer
Bh Win 03 RileybolleferBh Win 03 Rileybollefer
Bh Win 03 Rileybollefer
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Doctor Flow: Enterprise Flows best practices - patterns (SharePoint Saturday...
Doctor Flow:  Enterprise Flows best practices - patterns (SharePoint Saturday...Doctor Flow:  Enterprise Flows best practices - patterns (SharePoint Saturday...
Doctor Flow: Enterprise Flows best practices - patterns (SharePoint Saturday...
 
Ruby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter BootstrapRuby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter Bootstrap
 
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando TechnologyJena University Talk 2016.03.09 -- SQL at Zalando Technology
Jena University Talk 2016.03.09 -- SQL at Zalando Technology
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 

More from MT AG

MT AG: 7 gute Gründe warum Apex
MT AG: 7 gute Gründe warum ApexMT AG: 7 gute Gründe warum Apex
MT AG: 7 gute Gründe warum Apex
MT AG
 
MT AG: Ajax Rezepte fuer web services mit jquery und ajax
MT AG: Ajax Rezepte fuer web services mit jquery und ajaxMT AG: Ajax Rezepte fuer web services mit jquery und ajax
MT AG: Ajax Rezepte fuer web services mit jquery und ajax
MT AG
 

More from MT AG (16)

20160307 apex on_the_rocks
20160307 apex on_the_rocks20160307 apex on_the_rocks
20160307 apex on_the_rocks
 
20160308 apex sso
20160308 apex sso20160308 apex sso
20160308 apex sso
 
MT AG Data Vault Generator
MT AG Data Vault GeneratorMT AG Data Vault Generator
MT AG Data Vault Generator
 
MT AG: Sesam oeffne Dich
MT AG: Sesam oeffne DichMT AG: Sesam oeffne Dich
MT AG: Sesam oeffne Dich
 
MT AG: 7 gute Gründe warum Apex
MT AG: 7 gute Gründe warum ApexMT AG: 7 gute Gründe warum Apex
MT AG: 7 gute Gründe warum Apex
 
MT AG: Ajax Rezepte fuer web services mit jquery und ajax
MT AG: Ajax Rezepte fuer web services mit jquery und ajaxMT AG: Ajax Rezepte fuer web services mit jquery und ajax
MT AG: Ajax Rezepte fuer web services mit jquery und ajax
 
MT AG: Implementierungsvarianten mit-apex4.1
MT AG: Implementierungsvarianten mit-apex4.1MT AG: Implementierungsvarianten mit-apex4.1
MT AG: Implementierungsvarianten mit-apex4.1
 
MT AG Präsentation Rapid Application Development mit APEX 5
MT AG Präsentation Rapid Application Development mit APEX 5MT AG Präsentation Rapid Application Development mit APEX 5
MT AG Präsentation Rapid Application Development mit APEX 5
 
APEX & MTdoxx
APEX & MTdoxxAPEX & MTdoxx
APEX & MTdoxx
 
Datenmodellierung ist langweilig, lassen Sie Datamodeler das machen
Datenmodellierung ist langweilig, lassen Sie Datamodeler das machenDatenmodellierung ist langweilig, lassen Sie Datamodeler das machen
Datenmodellierung ist langweilig, lassen Sie Datamodeler das machen
 
Ist Gradle auch für die APEX-Projekte?
Ist Gradle auch für die APEX-Projekte?Ist Gradle auch für die APEX-Projekte?
Ist Gradle auch für die APEX-Projekte?
 
Tune up your APEX
Tune up your APEXTune up your APEX
Tune up your APEX
 
Echtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisierenEchtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisieren
 
Echtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisierenEchtes Single Sign-On mit APEX realisieren
Echtes Single Sign-On mit APEX realisieren
 
Five Finger Death Punch
Five Finger Death PunchFive Finger Death Punch
Five Finger Death Punch
 
Dateien per Drag & Drop in APEX Applikationen ablegen.
Dateien per Drag & Drop in APEX Applikationen ablegen.Dateien per Drag & Drop in APEX Applikationen ablegen.
Dateien per Drag & Drop in APEX Applikationen ablegen.
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 

Recently uploaded (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

20160307 apex connects_jira

  • 1. APEX connects Jira Oliver Lemm APEX World 07.03.2016
  • 2. Facts & Figures Independent Technology House with Cross-Industry Expertise Headquarter Ratingen (North Rhine – Westphalia) 240 Employees Founded 1994 Branches Dortmund, Cologne, Frankfurt Top Company for Trainees & Students Privately- Owned Corporation Oracle Platinum Partner 24 Mio. Euro Revenue 2
  • 3. about me § Oliver Lemm § since february 2007 working for MT AG in Ratingen § Junior Consultant > Consultant > Senior Consultant > Competence Center Leader APEX & Service Center Leader APEX § Diploma applied computer science at the university of Duisburg-Essen § Projectleader, IT-Architect and Developer § working with Oracle Databases and Oracle Application Express since 2007 § Blog http://oliverlemm.blogspot.de § Twitter https://twitter.com/OliverLemm 3
  • 4. Agenda 1. Motivation 2. Jira 3. Webservices 4. JSON 5. Livedemo 4
  • 5. Motivation „Working with one tool to handle the developing process, controlling and all other processes in one project“ „Calculating key figures based on Jira values which are not delivered by Jira itself.“ „Using integrated Jira Plugins and adding additional functionality by using APEX as known technology“ 5 requirements
  • 6. Jira § https://www.atlassian.com/JIRA § Issue tracking and code integration § Supporting Dashboards & Plugins § perfect integration from Confluence (wiki) and Subversion (versioning) § supporting complex workflows § Issue import from Bugzilla, Mantis, GitHub, … § Supporting von REST-Webservices 6
  • 7. 7
  • 9. Jira § supporting a huge number of attributes § time tracking (estimated, time spent, remaining) § Components (can be used for APEX pages and database objects) § versions § fields and screens adjustable per project § external issue numbers, date of commision, date of payment § Supporting own workflows § Describing a whole process, usable for non developing processes § Every step can be defined by user rights or issue dependencies § Using „JIRA Timesheet Reports and Gadgets Plugin“ 9 Integrated features
  • 10. Jira § key figures not in desired aggregation § time per year/month § no further support for SOAP Webservices in Jira § SOAP Interface doesn‘t return all values § Using Jira-Plugins § Listed Plugins not fullfilling all requiremends § Developing own Jira-Plugins is complex and time consuming 10 lack of features
  • 11. Jira § API documentation for Jira REST-Webservices https://docs.atlassian.com/jira/REST/latest/ § URL structure § http://host:port/context/rest/api-name/api-version/resource-name § Using an issue identfiied by the key JRA-9 would be like: § https://jira.atlassian.com/rest/api/latest/issue/JRA-9 § Using JQL Language (syntax) https://jira.mt-ag.com/rest/api/2/search?jql=project=BP § Returning values in JSON Format (testable also in browser) 11 REST-Webservice
  • 13. Jira § addional information when getting REST-Webservice Result § Default max 50 entries § 1. solution: add parameter &maxResults=XXX § 2. solution: add Parameter &startAt=50 § Sort the results § If no Authentication needed, don‘t submit username/password -> you get Unauthorized (401) 13 REST-Webservice "expand":"schema,names","startAt":0,"maxResults":50,"total":827,"issues":[….]} https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP&maxResults=1000 https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP&startAt=50 https://jira.mt-ag.com/rest/api/latest/search?jql=project=BP+order+by+duedate
  • 14. Webservices § getting Error: § Example: https://jira.atlassian.com/rest/api/latest/issue/JRA-9 14 ACL ORA-29273: HTTP request failed ORA-24247: network access denied by access control list (ACL) begin dbms_network_acl_admin.create_acl(acl => 'jira.atlassian.com.xml' ,description => 'An ACL for Calling REST Webservices.' ,principal => l_principal ,is_grant => true ,privilege => 'connect' ,start_date => systimestamp ,end_date => null); dbms_network_acl_admin.assign_acl(acl => 'jira.atlassian.com.xml' ,host => 'jira.atlassian.com' ,lower_port => 443 ,upper_port => 443); commit; end;
  • 15. Webservices § Getting existing ACL Entries § Important for ACL § Using Web Service References (shared components or the APEX_WEB_SERVICE (package) § principal = APEX_050000 § using utl_http or other packages calling external resources § principal = my_schema_name 15 ACL select a.acl ,a.host ,a.lower_port ,a.upper_port ,p.principal ,p.privilege ,p.is_grant ,to_char(p.start_date ,'DD-MON-YYYY') as start_date ,to_char(p.end_date ,'DD-MON-YYYY') as end_date from dba_network_acl_privileges p left join dba_network_acls a on a.acl = p.acl
  • 17. Webservices § calling https: § To solve this problem, you have to get the certificates which are used by the server which runs Jira § Getting certificate § use your browser and call the URL from the REST-Webservice or even from Jira § click on the lock symbol § click show certificate 17 exporting certificate ORA-29273: HTTP request failed ORA-29024: Certificate validation failure
  • 19. Webservices § use the Oracle Wallet Manager (OWM) to import the certificate § run ORACLE_HOMEbinowm.cl (on windows a link is created) § Import of the certificate is also possible using the command line § create a wallet for the certificate using a path like this ORACLE_BASEadmin<SID><name_wallet> § Use automatic login for your wallet (otherwise you have to use the wallet always with your password in your plsql code) 19 importing certificate
  • 20. Webservice § APEX documentation http://docs.oracle.com/cd/E59726_01/doc.50/e39151/adm_wrkspc002.htm#BABHEHAG § Login into your INTERNALWorkspace ØManage Instance ØInstance Settings ØWallet 20 certificate in APEX
  • 21. Webservices § still getting error like: § The ACL Syntax has been changed so look up changed ACL behavior for 12c. 21 12c ORA-29273: HTTP request failed ORA-12541: TNS:no listener
  • 22. Webservices § Shared Components § Web Service References § Create § Problems § based on single items § authentification § result as CLOB only in Collection. No support in § apex_items § report columns § JSON Format 22 Web Service Reference
  • 24. Webservice § Call REST § p_http_method GET, HEAD, POST, PUT, DELETE § Username & Password supporting Basic Authentication § Parameter if parameter beside the URL itself are needed 24 APEX_WEB_SERVICE l_clob := apex_web_service.make_rest_request( p_url => 'https://jira.atlassian.com/rest/api/latest/issue/JRA- 9' ,p_http_method => 'GET' ,p_wallet_path => 'file:C:oracleadminorclmein_wallet' ,p_username => 'lemmo' ,p_password => '123456 '‚ ,p_parm_name => apex_util.string_to_table('param1:param2'), ,p_parm_value => apex_util.string_to_table('val1:val2') );
  • 25. JSON § Datentypen § String § "QS - Demo Feature" § "2015-11-03T13:48:16.630+0100" § Number § 20 § Boolean § true / false § Null § null § Array § [ {…}, {…}] 25 format { "id": "17149", "self": "https://jira.mt-ag.com/rest/api/latest/issue/17149", "key": "BP-7", "fields": { “summary": "QS - Demo Feature", "progress": { "progress": 19800, "total": 19800, "percent": 100 }, "created": "2015-11-03T13:48:16.630+0100", worklog": { "startAt": 0, "maxResults": 20, "total": 2, "worklogs": [ { ... }, { ... } ] } } }
  • 26. JSON § convert clob to JSON object § looping entries § get value 26 processing l_values apex_json.t_values; …. apex_json.parse(p_values => l_values ,p_source => l_clob); for i in 1 .. apex_json.get_count(p_values => l_values ,p_path => '.') loop … end loop l_jira_issue.key := apex_json.get_varchar2(p_values => pi_json_issue ,p_path => 'key'); l_jira_issue.timespent := apex_json.get_number(p_values => pi_json_issue ,p_path => 'fields.timespent');
  • 27. JSON § Number as String § you have to convert § Datetime as String § Converting with apex_json.get_date doesn‘t work because of format § custom fields in Jira are named like customfield_xxxxx 27 special cases "id": "17149" "created": "2015-11-03T13:48:16.630+0100" l_timestamp := to_timestamp_tz(pi_string ,'YYYY-MM-DD"T"hh24:mi:ss.FF3TZHTZM'); l_string := to_char(l_timestamp ,'yyyy.mm.dd hh24:mi:ss'); l_date := to_date(l_string ,'yyyy.mm.dd hh24:mi:ss'); apex_json.get_varchar2(p_values => pi_json_issue ,p_path => 'fields.customfield_10000');
  • 28. JSON § Time worked / Worklog not with information by day encapsuleted in issue § you have call the worklog for every single ticket by one REST Call 28 special cases for i in 1 .. apex_json.get_count(p_values => l_values, p_path => 'issues') loop l_rest_response := make_rest_request(pi_url => pi_jira_base_url || c_jira_rest_base_path || '/issue/' || apex_json.get_varchar2(p_values => l_values, p_path => 'issues[' || i || '].key') ,pi_username => pi_username ,pi_password => pi_password); apex_json.parse(p_values => l_values_issue, p_source => l_rest_response); l_jira_issue := get_issue_from_json(pi_json_issue => l_values_issue); for j in 1 .. apex_json.get_count(p_values => l_values_issue ,p_path => 'fields.worklog.worklogs') loop l_jira_issue_worklog := get_issue_worklog_from_json(pi_json_issue_worklog => l_values_issue ,pi_path => 'fields.worklog.worklogs[' || j || '].' ,pi_jira_issue_id => l_jira_issue.id ,pi_jira_issue_key => l_jira_issue.key); pipe row(l_jira_issue_worklog);
  • 29. JSON § transform JSON into type § easier to use § Transformation in package instead APEX § testing possible by using sql § Entities defined as column names § documentation von CollectionSpalte – JSON – Spaltenname im Type § using table function based on defined types 29 processing create or replace type t_jira_issue force as object ( -- { id: "16276" -- c001 id number, -- Jira Issue ID -- { self: https://jira.mt- ag.com/rest/api/2/issue/16276 -- c003 url_json varchar2(32767), -- c003 - JSON URL -- { key: "UITFPP-1057„ -- c001 key varchar2(32767), -- Issue Key select * from table(jira_rest_ws_pkg.get_projects(pi_base_url => 'https://jira.atlassian.com'))
  • 30. APEX § using APEX_COLLECTIONS § not every search means new webservice call § loading page doesn‘t call a webservice § APEX itself relies also on collections when working with Web Service References § problem authentication for webservice call § every call needs a username & password § using Web Service Reference it‘s inconvenient § using Application Items instead § when logging into the apex application password is saved on server-side by application item § attention the password value is visible in session state 30
  • 32. Conclusion § complexity is huge because of many different technical aspects § all important key facts are calculateable § transforming JSON in JavaScript or PL/SQL is not easy in the beginning § first time parsing JSON even with APEX_JSON needs practice remember in 12c you can directly parse JSON by SQL § Using APEX integrated „Web Service Reference“ only for simple examples 32