Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: findParty_Status. (OFBIZ-12677) #531

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

georg1312
Copy link
Contributor

Improved: Backend Party Manager: Removed hidden statusId field and added drop-down for status selection in findparty form to be able to find not ENABLED parties too. (OFBIZ-12677)

Central actor search around the static Party.statusId field simplified and the logic behind it fixed. Thus, the statusId value is also available in performPartyFind Service.

@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

<attribute name="noConditionFind" type="String" mode="IN" optional="true" default-value="N"/>
<attribute name="extInfo" type="String" mode="IN" optional="true"/>
<attribute name="extCond" type="org.apache.ofbiz.entity.condition.EntityCondition" mode="IN" optional="true">
<description>EntityCondition that can be send to this service to manage complex search case</description>
</attribute>
<attribute name="partyId" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this, can do partial, case insensitive, etc -->
<attribute name="partyTypeId" type="String" mode="IN" optional="true"/>
<attribute name="roleTypeId" type="String" mode="IN" optional="true"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is unwanted change. Could you please revert?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree I see no reason why
<attribute name="roleTypeId" type="String" mode="IN" optional="true"/> <!-- can be null or ANY to include any -->
has been moved. Not a big deal but we lose the comment

// NOTE: _must_ explicitly allow null as it is not included in a not equal in many databases... odd but true
andExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", GenericEntity.NULL_FIELD),
EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
if ("PARTY_ENABLED".equals(statusId)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please share use case why this change is needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK to be able to select disabled party. That can make sense in some situations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll discuss those changes and will provide an altered pull request.
Will take at least two weeks as georg is not available atm.

@JacquesLeRoux
Copy link
Contributor

Hi @mbrohl, should we close?

@mbrohl
Copy link
Contributor

mbrohl commented Feb 15, 2024

I'll check when I'm back from vacation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants