Skip to content

Commit

Permalink
Issue #1449: Fix Case for normal DynamicDBFields
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaerter committed Jan 10, 2022
1 parent 7c427a8 commit 15b451e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions var/httpd/htdocs/js/Core.Agent.DynamicFieldDBSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,20 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
/TicketID=(\d+)/.exec(document.URL);
TicketID = RegExp.$1;

// for usage in process context
var LiElementId = $Element.parents().closest('li.Activity').attr('id');
var ActivityDialogId = LiElementId.match(/^Process_ActivityDialog-([a-f0-9]{32})$/)[1];
if (typeof LiElementId !== 'undefined') {
var ActivityDialogId = LiElementId.match(/^Process_ActivityDialog-([0-9a-f]{32})$/)[1];
DynamicFieldName = DynamicFieldName.substring(0, DynamicFieldName.indexOf('_' + ActivityDialogId));
}

// serialize form
QueryString = Core.AJAX.SerializeForm($('#'+DynamicFieldName).closest('form'), IgnoreList) + SerializeData(UpdateList);

QueryString += ";Action="+FrontendInterface;
QueryString += ";Term="+encodeURIComponent(Request.term);
QueryString += ";MaxResults="+Core.Config.Get('Autocomplete.MaxResultsDisplayed');
QueryString += ";DynamicFieldName="+encodeURIComponent(DynamicFieldName.substring(0, DynamicFieldName.indexOf('_' + ActivityDialogId)));
QueryString += ";DynamicFieldName="+encodeURIComponent(DynamicFieldName);
QueryString += ";TicketID="+encodeURIComponent(TicketID);

URL = Core.Config.Get('Baselink');
Expand Down

0 comments on commit 15b451e

Please sign in to comment.