- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2023 10:03 PM
I have the field u_jira_project on the incident table of type Reference to u_jira_project table. I need to create a form button called 'Create Jira'. When the user click on this button, he needs to see a pop up with all the projects from u_jira_project table divded into two columns: u_project_name, u_project key. After the user chose a project, the value of the project that he chose need to be populated inside u_jira_project field on the incident table. How can I achieve that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:39 AM
Their is one more error: make it name,key
var $j = jQuery.noConflict();
var ga = new GlideAjax('ShowJiraProject');
ga.addParam('sysparm_name', 'getProjects');
ga.getXML(parseResponse);
function parseResponse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
var str = "<div><table class='table' id='tableData'><tr><th>Name</th><th>Key</th></tr>";
answer = JSON.parse(answer);
for (var i = 0; i < answer.length; i++) {
str = str + '<tr id="tableRow"><td>' + answer[i].name +'</td><td>' + answer[i].key + '</td></tr>';
}
$j('#iframee').append(str);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:57 AM
There are a lot many tasks in this, will try to help you as I get time daily!
I am also stuck somewhere that has to be completed before this week ends!
I hope you understand 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 01:22 PM
Hi
You can achieve this functionality by creating an ui-action on the incident table, which opens a dialog window with a list of projects from the u_jira_project table. Once the user selects a project, a script can set the value of the u_jira_project field on the incident table to the selected project's sys_id.
Please have a look at Exalate integration software. It enables you to synchronize data between the two systems, including incidents and projects, automating the transfer and ensuring they remain in sync.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:20 AM
@Prince Arora everything is written right pls see the new attachments. what could be the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:27 AM
what has been came up in this alert, below highlighted!
var $j = jQuery.noConflict();
var ga = new GlideAjax('ShowJiraProject');
ga.addParam('sysparm_name', 'getProjects');
ga.getXML(parseResponse);
function parseResponse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
var str = "<div><table class='table' id='tableData'><tr><th>Name</th><th>Key</th></tr>";
answer = JSON.parse(answer);
for (var i = 0; i < answer.length; i++) {
str = str + '<tr id="tableRow"><td>' + answer[i].u_jira_name +'</td><td>' + answer[i].u_jira_key + '</td></tr>';
}
$j('#iframee').append(str);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:30 AM
@Prince Arora now im clicking on try it im not getting the error anymore but im getting a blank page. its like it cant retrieve the data? what could be the reason?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:36 AM
Might be cache issue, I have tried your code in PDI and I am not getting the errors,
Can you tell me what has been came up in alert(answer)? do you get any data from backend?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 03:39 AM
Their is one more error: make it name,key
var $j = jQuery.noConflict();
var ga = new GlideAjax('ShowJiraProject');
ga.addParam('sysparm_name', 'getProjects');
ga.getXML(parseResponse);
function parseResponse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
var str = "<div><table class='table' id='tableData'><tr><th>Name</th><th>Key</th></tr>";
answer = JSON.parse(answer);
for (var i = 0; i < answer.length; i++) {
str = str + '<tr id="tableRow"><td>' + answer[i].name +'</td><td>' + answer[i].key + '</td></tr>';
}
$j('#iframee').append(str);
}