Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
45ea78a2
Commit
45ea78a2
authored
5 years ago
by
Johannes Goderbauer
Browse files
Options
Downloads
Patches
Plain Diff
fix #1042973: ignore private organisations for standard address check
parent
b8d391c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
process/Organisation_lib/process.js
+24
-0
24 additions, 0 deletions
process/Organisation_lib/process.js
process/StandardObject_lib/process.js
+3
-0
3 additions, 0 deletions
process/StandardObject_lib/process.js
with
27 additions
and
0 deletions
process/Organisation_lib/process.js
+
24
−
0
View file @
45ea78a2
...
...
@@ -20,6 +20,30 @@ import("KeywordRegistry_basic");
*/
function
OrgUtils
()
{}
/**
* checks if a organisationid is the id of the dummy organisation "private"
*
* @param {String} pOrganisationId the id that shall be checked
*
* @return {boolean} true if passed organisationid is organisationid of the dummy organisation "private"
*/
OrgUtils
.
isPrivateOrganisationId
=
function
(
pOrganisationId
)
{
//TODO: use this function everywhere instead of manual checks
return
pOrganisationId
.
trim
()
==
OrgUtils
.
getPrivateOrganisationId
();
}
/**
* returns the image for a organisation
*
* @return {String} hard coded organisationid of the dummy organisation "private"
*/
OrgUtils
.
getPrivateOrganisationId
=
function
()
{
//TODO: use this function everywhere instead of hardcoded organisationids "0"
return
"
0
"
;
}
/**
* returns the image for a organisation
*
...
...
This diff is collapsed.
Click to expand it.
process/StandardObject_lib/process.js
+
3
−
0
View file @
45ea78a2
import
(
"
Organisation_lib
"
);
import
(
"
system.db
"
);
import
(
"
Keyword_lib
"
);
import
(
"
KeywordRegistry_basic
"
);
...
...
@@ -227,6 +228,8 @@ StandardObject.prototype._setContactStandardAddress = function (pAddressID, pCon
* @return Standard address of the organisation or null.
*/
StandardObject
.
prototype
.
_getCompanyStandardAddress
=
function
(
pOrganisationID
)
{
if
(
OrgUtils
.
isPrivateOrganisationId
(
pOrganisationID
))
return
null
;
var
addressIdResult
=
db
.
cell
(
"
select ADDRESS_ID from CONTACT
"
+
"
where ORGANISATION_ID = '
"
+
pOrganisationID
+
"
'
"
+
"
and ADDRESS_ID is not null and PERSON_ID is null
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment