How to register a JIRA webhook on Zephyr

1.How to setup Webhook in Vanilla instance of Zephyr in 5.0.3? :
a. Install 5.0.3
b. Login as test.manager -> Go to administration 
c. System Configuration -> Access URL -> Update System Dashboard/Desktop url to zee instance Ip 


d. Defect Tracking -> Set Defect Tracking System (dts)  to Jira (Only Jira Admin user credentials) -> Save it
e. After successfully save Defect Tracking System to Jira  -> Go to database


f. In database -> ITCC>Table -> "Defect Tracking System" table -> Verify the "Webhook ID" column, after set dts "Webhook ID" will update with new ID.


g. In External jira ->  Navigate to the JIRA administration console -> System -> Webhooks (in the Advanced section) -> Verify new Webhook will be created with ZEE ip.( Example: http://localhost/flex/services/rest/latest/jira/webhooks/callback)

2.. How to setup Webhook in upgraded/restore ZEE 5.0.3 instance ? :

Case 1.a  (Upgrade) : If Defect Tracking System is already set in 5.0/5.0.1/5.0.2
a. Run 5.0.3_installer -> Select "Upgrade" mode 
b. After successfully upgrade -> Launch html
c. Login as test.manager -> Go to administration
d. System Configuration -> Access URL -> Update System Dashboard/Desktop url to zee instance Ip
e. Defect Tracking -> Re-login/Reset (If backup JIRA not reachable) Defect Tracking System  -> Save it
f. After successfully relogin Dts -> Go to database
g. In database -> Table -> "Defect Tracking System" table -> Verify the "Webhook ID" column, after set dts "Webhook ID" will update with new ID.
h. In External jira ->  Navigate to the JIRA administration console -> System -> Webhooks (in the Advanced section) -> Verify new Webhook will be created with ZEE ip.(Example: http://localhost/flex/services/rest/latest/jira/webhooks/callback)
Case 1.b: If DTS is not set in backup data 
a. After restore/upgrade successfully to 5.0.3 → Steps will be followed as same as 1. "Vanilla Instance"

Notes: 

a. Only Jira admin user will have "Webhook" create permission.
b. 1. When set defect tracking system very first time , it will create a webhook in Jira with ip of current Zephyr access url. New Webhook Id will update in Zephyr database Itcc_ "defect tracking system" table.
2. When set dts back to none, it deletes created webhook from jira. Webhook Id will update to "Null" in Zephyr database Itcc_ "defect tracking system" table
3. Again , when you set dts to same dt ira -> It will create a new webhook in External Jira. New Webhook Id will update in Zephyr database Itcc_ "defect tracking system" table.
4. If dts is already set to any jira -> User relogin or reset the same jira -> No new webhook will get create in external Jira and in database old webhook id will be there.
c. Zee instance port should be 80 , if it is having http port as per JOD limitations
d. Zee instance port should be 443 , if it is having https port as per JOD limitations
e. Remote link doesn't send any call back from Jira to Zee. So , In ZEE doesn't get jira remote link updates
f. If we are using JOD then we should have ZEE public IP in webhook URL in JIRA. (private IP will not get callback from JOD).