Create Jira Button on incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 12:24 AM
This is the flow of the task:
1. the user click on 'Create Jira' button from the current incident.
2. After clicking on the button a pop up with a list of project with u_project_name and their relevant u_project_key is being displayed from u_jira_project table. (Both fields columns are type String).
3. Then the user can choose a project and then the current field u_jira_project (type Reference to u_jira_project_table) on the incident needs to be populated with the value that the user chose.
4. At the same time that the field u_jira_projectis being populated with value that the user chose, we need to create a ticket in Jira system using 'Jira' rest message and his 'create_bug' Post http method.
5. After creating the ticket in Jira system, the Jira system will provide a response back. We need to take this response and pull from their the id and populated the field u_jira_id on the current incident.
I already created a rest message 'Jira' with HTTP Post Method 'create_bug'.
This is the JSON Content:
{
"fields":{
"description":"${description}",
"issuetype":{
"name":"Bug"
},
"project":{
"key":"${project_key}"
},
"summary":"${summary}",
"priority":{"id":"${priority}"}
}
}
This is the map field for the dynamic parameters (all the fields need to pass a string values and not as sys_id) from the Content JSON:
${description} = current incident description
${project_key} = the related u_project_key of the u_project_name that the user chose from the list of project ${summary} = current incident short_description
${priority} = we need to see what is the value of the current incident priority and then do this mapping to string values: If the value is 1, need to pass string "Critical"
if the value is 2, need to pass string "High"
if the value is 3, need to pass string "Medium"
if the value is 4, need to pass string "Low
I know that this can be done using UI Action, UI Page and Script Include but Im struggling. I dont know how to do the scripting part of each section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 12:39 AM
Hi @Alon Grod,
You, yourself answered it. And Yes, you can achieve it by using the same.
May i know if you have followed coding UI Action, UI Page, and Script for this functionality ?
If not, let me know if i can be of any assist. Will try to assist with my best possible way.
Thanks,
Vamshi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 12:49 AM
@Rao Vamshi Hi Rao to be honest I have no idea to do the coding part for these sections. If you have time I will really appreciate if you can help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 01:04 AM
Hi @Alon Grod
That's not a problem. I will attempt to guide you with my best possible knowledge, you can give a try by following these below steps to implement the functionality using UI Action, UI Page, and Script Include:
1. Create a UI action to trigger the pop-up dialog that displays the list of jira projects.
2. Create a UI page to display the list of jira projects in the pop-up dialog.
3. Create a script include to handle the jira API integration and ticket creation process.
4. Update the UI action to populate the u_jira_project field with the selected jira project and call the script include to create a new jira ticket.
5. Update the script include to extract the jira ticket ID from the jira API response and update the u_jira_id field on the current incident.
Some sample code to get you started:
(UI Action)
(UI Page)
(Script Include)
I hope this helps! Let me know if you have any further questions.
Please mark helpful/correct, if your query is addressed and/or answered!
Thanks,
Vamshi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 01:16 AM
@Rao Vamshi chat gpt is not helpful man i alreay tried some of these scripts. need something more specific and less general