-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Add external billing id on enterprises #12980
base: master
Are you sure you want to change the base?
Add external billing id on enterprises #12980
Conversation
ccd284b
to
193be72
Compare
Oops, it seems I have some failing specs, working on it asap. |
LGTM! Many thanks @pacodelaluna ❤️ |
@pacodelaluna FYI the OFN docker image changed recently: #12905 |
@pacodelaluna sorry me again. Apologies I didn't pay a close attention to the screenshot the first time, and now that i'm playing with it I'm noticing that you've moved fields in the admin section that should remain accessible to enterprise managers/owners: These two need to stay in "primary details tab'. |
Hi @pacodelaluna sorry that you're having issues with Cuprite. I don't have time to help until next year sorry, but you can try posting in Slack #dev channel in case someone else can help. |
Apologies, I see I must have overridden you on the staging-FR server. I hope I did not cause too much trouble 🙏 |
no don't worry @filipefurtad0 and I see I've forgotten to remove the label 🤦♀️ please use it as much as you need on your timezone. FR team is developing a tool to automate invoices to OFN users, and this PR is needed for the tests, so I will stage it again in the next couples of days, but again feel free to use the staging during your time 💪 |
3ddc08c
to
3230159
Compare
ec546f5
to
3bcca1e
Compare
My comment was more about the fact that I find the UX a bit weird: a below field has an impact on another field which is located above it. But let's keep it that way 👍 I've moved the PR to code review @pacodelaluna many thanks!!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this looks like a nice tidy way to solve it in the end!
I have a couple of small suggestions, otherwise it's all good to go.
For the second reviewer: just review the full diff.
@@ -0,0 +1,5 @@ | |||
class AddExternalBillingIdOnEnterprises < ActiveRecord::Migration[7.0] | |||
def change | |||
add_column :enterprises, :external_billing_id, :string, limit: 128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I agree that there shouldn't be more than 128 chars in this field.
Scanning schema.rb, I see that most fields are set to 255 🤷 Probably it doesn't matter.
|
||
context "when there is a external billing id" do | ||
let(:enterprise) { create(:distributor_enterprise, external_billing_id: 'INV123456') } | ||
|
||
it "includes URLs of image versions" do | ||
serializer = Api::Admin::EnterpriseSerializer.new(enterprise) | ||
expect(serializer.as_json[:external_billing_id]).to eq('INV123456') | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we don't really need an extra test for this, we could add the expectation to the first test in this file (because we don't need to test "when there is no billing id").
Would it be ok to change that? That would help avoid growing this file too much.
@@ -89,6 +90,7 @@ | |||
"none", | |||
"none", | |||
"none", | |||
"none", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an opportunity to test that it shows in the report, can it be added for one of the distributors?
7d15401
to
33f7d8d
Compare
@dacook I have just applied your suggestions about the specs, please tell me if it is ok now, thanks for your time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this is looking good now.
What? Why?
The objective is to improve the links between OFN enterprises and external billing tools, through the admin reports.
What should we test?
Release notes
Changelog Category (reviewers may add a label for the release notes):
Add external billing id on enterprises
The title of the pull request will be included in the release notes.
Documentation updates
No. The tip section should explain the objective of the new field with enough details.