Commit 144213d4 authored by Sandeep Kadam's avatar Sandeep Kadam
Browse files

Merge branch 'rt_v5_fix' into 'master'

Added more fixes to show selected custom field & queues

See merge request !4
parents cb489d64 a4add18b
......@@ -141,7 +141,7 @@ function getName(full) {
* @return String, eg "Web Development"
*/
function getQueue() {
return getElementText('div.ticket-info-basics div.queue div.value').split('\n')[0];
return getElementText('div.ticket-info-basics div.queue span.current-value', 'text').split('\n')[0];
}
/**
......@@ -149,7 +149,7 @@ function getQueue() {
* @return String, eg
*/
function getOwner() {
var owner=getElementText('div.ticket-info-people div.value', 'text').split('\n')[0];
var owner=getElementText('div.ticket-info-people span.current-value', 'text').split('\n')[0];
if (owner.indexOf('(') !== -1) {
owner=/\((.*)\)/gi.exec(owner)[1];
}
......@@ -161,7 +161,8 @@ function getOwner() {
* @return String
*/
function getCustomField(id) {
return getElementText('div.ticket-info-cfs div.custom-field div#CF-' + id + '-ShowRow div.value', 'text').split('\n',1)[0];
var field_val = getElementText('div#CF-' + id + '-ShowRow span.current-value', 'text').split('\n',1)[0];
return field_val;
}
/**
......@@ -488,6 +489,7 @@ function init() {
var queues = getQueues();
var queue;
container = document.querySelector('div.ticket-info-basics div.queue div.value');
if (!container) {
return;
}
......@@ -893,8 +895,6 @@ function init() {
var temp = document.createElement('div');
temp.innerHTML = response.responseText;
setValue('name', temp.querySelector('div.RealName span.value').innerHTML);
var queueOptions = temp.querySelectorAll('select[name="Queue"] option');
for (var queueOption in queueOptions) {
if (queueOptions[queueOption].value && queueOptions[queueOption].text) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment