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

Change the JSONLookupValue format #666

Closed
teosarca opened this issue Nov 8, 2017 · 7 comments
Closed

Change the JSONLookupValue format #666

teosarca opened this issue Nov 8, 2017 · 7 comments

Comments

@teosarca
Copy link
Member

teosarca commented Nov 8, 2017

Is this a bug or feature request?

FR

What is the current behavior?

Currently the lookup values have following JSON format:

{
	"<key>" : "<caption>"
}

e.g. integer key

{
	1000123 : "Some caption"
}

e.g. string key

{
	"CO" : "Complete"
}

What is the expected or desired behavior?

The biggest limitation of that format is that we cannot extend it... or if we do, it will be very twisted.
For that reason we shall change it to:

{
	"key" : <key>
	"caption" : <caption>
	
	// other optional attributes, e.g.
	"attributes" : { .... },
	"attributes2" : { .... }
}

The frontend shall not care about the other optional attributes, it just has to get then and pass it back when the lookup value is sent back.
e.g. the /dropdown endpoint was called and it returned some lookup values. The user picks one. The forntend shall send back the selected value including all it's optional attributes.
This is happening at the moment, but i just underline it because we need to keep this functionality.

@teosarca
Copy link
Member Author

teosarca commented Nov 8, 2017

update: at the moment, i am using an intermediary solution (i.e. keeping the "key":"caption" pair as first one, but also having the "key", "caption" and other attributes).
While using this approach, it seems frontend almost work OK, but i found some cases where this is an issue.
Bellow i will list them.

Document Actions

image

@metas-rc
Copy link
Member

metas-rc commented Nov 8, 2017

image

@metas-dh
Copy link
Member

metas-dh commented Nov 8, 2017

2017-11-08 11_01_08-metasfresh

teosarca added a commit that referenced this issue Nov 8, 2017
@cristinamghita
Copy link
Member

cristinamghita commented Nov 8, 2017

image

@cristinamghita
Copy link
Member

image

@pablosichert
Copy link

Does this only affect this endpoint?

metas-ts pushed a commit that referenced this issue Nov 10, 2017
metas-ts pushed a commit that referenced this issue Nov 10, 2017
metas-ts pushed a commit that referenced this issue Nov 10, 2017
#666
(cherry picked from commit 9393a77)
metas-ts pushed a commit that referenced this issue Nov 10, 2017
metas-ts added a commit to metasfresh/metasfresh that referenced this issue Nov 12, 2017
[#668](metasfresh/metasfresh-webui-api-legacy#668)
Handling Unit Editor Action Internal Usage not possible for more than 1
Page
[#664](metasfresh/metasfresh-webui-api-legacy#664)
Create Purchase Order Line by Line via Sales Order Lines
[#1327](metasfresh/metasfresh-webui-frontend-legacy#1327)
frontend: Change the JSONLookupValue format
[#1199](metasfresh/metasfresh-webui-frontend-legacy#1199)
Picking Window unselect line in modal overlay
[#666](metasfresh/metasfresh-webui-api-legacy#666)
Change the JSONLookupValue format
[#1308](metasfresh/metasfresh-webui-frontend-legacy#1308)
Closing a document with changes shall discard those changes
[#1286](metasfresh/metasfresh-webui-frontend-legacy#1286)
Error when maximize subtab which does not support quick input
[#1279](metasfresh/metasfresh-webui-frontend-legacy#1279)
menu actions for included row broken
[#2917](#2917) Allow
reactivating procurement contracts
[#2754](#2754) Cleanup
Function for old AD_Issue records
[#2816](#2816) Material
Dispo - include storage-relevant attributes
[#649](metasfresh/metasfresh-webui-api-legacy#649)
Qty Delivered and Qty Picked not updated correctly in shipment schedule
[#1219](metasfresh/metasfresh-webui-frontend-legacy#1219)
Show mandatory fields not in blue but in red to match user expectation
[#2914](#2914) Replace
org.adempiere.util.collections.Predicate with
java.util.function.Predicate
[#660](metasfresh/metasfresh-webui-api-legacy#660)
JSONUserSessionChangesEvent not fired when currently logged in user is
changed

me-45
@metas-dh
Copy link
Member

Results of IT1
tested in mf15

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

No branches or pull requests

6 participants