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

[WIP] Add price and currency cols to services #350

Closed
wants to merge 1 commit into from

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Mar 18, 2019

As part of an RFE that I ended up with, we need backend support to be able to save a price of catalog when adding a Catalog Item, aka a service. Since we have no way of storing that information on services at the moment, we need a price and a currency column.

The schema portion of https://bugzilla.redhat.com/show_bug.cgi?id=1602072

@d-m-u
Copy link
Contributor Author

d-m-u commented Mar 18, 2019

@miq-bot add_label enhancement

@d-m-u d-m-u force-pushed the adding_price_things_to_services branch from 5278aed to 92115a9 Compare March 18, 2019 12:16
@miq-bot
Copy link
Member

miq-bot commented Mar 18, 2019

Checked commit d-m-u@92115a9 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@lpichler
Copy link
Contributor

lpichler commented Mar 18, 2019

@d-m-u maybe it will be helpful:

we have model ChargebackRateDetailCurrencyand related table is seeded with 164 currencies with other information like symbol, code,..:

 pp ChargebackRateDetailCurrency.first
  ChargebackRateDetailCurrency Load (0.3ms)  SELECT  "chargeback_rate_detail_currencies".* FROM "chargeback_rate_detail_currencies" ORDER BY "chargeback_rate_detail_currencies"."id" ASC LIMIT $1  [["LIMIT", 1]]
  ChargebackRateDetailCurrency Inst Including Associations (0.1ms - 1rows)
#<ChargebackRateDetailCurrency:0x00007fb5633035c0
 id: 1,
 code: "USD",
 name: "United States Dollar",
 full_name: "United States Dollar",
 symbol: "$",
 unicode_hex: "36",
 created_at: Thu, 07 Feb 2019 12:54:12 UTC +00:00,
 updated_at: Mon, 18 Mar 2019 10:18:58 UTC +00:00>

so I am asking if you want to use it and make relation between Services#currency and ChargebackRateDetailCurrency. But I don't know use cases.

@d-m-u d-m-u changed the title Add price and currency cols to services [WIP] Add price and currency cols to services Mar 18, 2019
@miq-bot miq-bot added the wip label Mar 18, 2019
@tinaafitz
Copy link
Member

HI @lpichler, We haven't had to deal with prices/currency up until now. The use case is that we need to add a price and currency field during Service item creation to be displayed to the user at Catalog ordering time. Based on that, how should we proceed?

@carbonin
Copy link
Member

I think @lpichler 's approach is probably best. That way we won't have to duplicate currency options. @tinaafitz is this just for display? Or are you going to integrate with chargeback at a more significant level?

@tinaafitz
Copy link
Member

Thanks @carbonin. My understanding is that this is just for display purposes.

@carbonin
Copy link
Member

Okay, then it's probably best to just use a reference to the existing, seeded, table rather than copying that effort. It will likely make things easier on the UI side as well.

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

Successfully merging this pull request may close these issues.

None yet

5 participants