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

Latest from open 2020 03 11 #79

Closed
wants to merge 373 commits into from
Closed

Conversation

joshea0
Copy link

@joshea0 joshea0 commented Mar 11, 2020

Release Notes

This is a huge merge because we have not been keeping a regular update from nucore-open. I am going to test it thoroughly in our staging environment before deploying to production.

Going forward, we will be merging nucore-open on a regular schedule to avoid merges this large in the future.

What is included

dependabot-preview bot and others added 30 commits July 22, 2019 11:23
Bumps [rake](https://github.com/ruby/rake) from 12.3.2 to 12.3.3.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](ruby/rake@v12.3.2...v12.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [eye-patch](https://github.com/tablexi/eye-patch) from 0.5.1 to 1.1.0.
- [Release notes](https://github.com/tablexi/eye-patch/releases)
- [Commits](tablexi/eye-patch@v0.5.1...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [oj](https://github.com/ohler55/oj) from 3.7.12 to 3.8.1.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](ohler55/oj@v3.7.12...v3.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
wyeworks#2036)

* Remove unused code and settings for notifying on an order detail’s status changes

The default settings are commented out in both the nucore-nu and nucore-dartmouth repositories, so this code is not used anywhere.

* Remove unused email Notifier#order_detail_status_change
Bumps [haml](https://github.com/haml/haml) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/haml/haml/releases)
- [Changelog](https://github.com/haml/haml/blob/master/CHANGELOG.md)
- [Commits](haml/haml@v5.1.1...v5.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.3 to 1.10.4. **This update includes a security fix.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.10.3...v1.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.32.0 to 0.33.0.
- [Release notes](https://github.com/sds/haml-lint/releases)
- [Changelog](https://github.com/sds/haml-lint/blob/master/CHANGELOG.md)
- [Commits](sds/haml-lint@v0.32.0...v0.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [oj](https://github.com/ohler55/oj) from 3.8.1 to 3.9.0.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](ohler55/oj@v3.8.1...v3.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [sass-rails](https://github.com/rails/sass-rails) from 5.0.7 to 6.0.0.
- [Release notes](https://github.com/rails/sass-rails/releases)
- [Commits](rails/sass-rails@v5.0.7...v6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…#2044)

* Add flag for emailing purchasers on order status changes

* Surface Product#email_purchasers_on_order_status_changes in the UI

* Consolidate calls to delegate at top of OrderDetail class

* Remove commented-out spec code

* Remove unused OrderStatus#downcase_name

* Email the purchaser of an order when its status changes and the product is configured to do so
* facility senior staff can see problem queues

* fix specs
* remove footer from bulk email

* fix specs
* move transactions in review into nav

* fix spec
We're now in fiscal year 2020, so a test was failing because it was hard coded
to mean 2020 was in the future.
Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](flyerhzm/bullet@6.0.1...6.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [oj](https://github.com/ohler55/oj) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](ohler55/oj@v3.9.0...v3.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
jhanggi and others added 21 commits February 24, 2020 16:31
# Release Notes

Tech task: Allow ES6 syntax in JS.

# Additional Context

This error came up on open stage: `Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true)`
# Release Notes

Tech task: shorten index name for product display groups position field because it is too long for Oracle.

# Additional Context

Oracle has a limit of 30 characters. I had given it an explicit name because Mysql also has some restrictions around index names.

I added this as a separate migration so that if the previous migration (which I have now changed) has already run, it'll clean up the name there.
# Release Notes

Tech task: Fix account membership cloner spec when running under Oracle.

# Additional Context

Mysql does a case-insensitive search, while Oracle is sensitive.
Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](Shopify/bootsnap@v1.4.5...v1.4.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [haml_lint](https://github.com/sds/haml-lint) from 0.34.2 to 0.35.0.
- [Release notes](https://github.com/sds/haml-lint/releases)
- [Changelog](https://github.com/sds/haml-lint/blob/master/CHANGELOG.md)
- [Commits](sds/haml-lint@v0.34.2...v0.35.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [oj](https://github.com/ohler55/oj) from 3.10.2 to 3.10.3.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](ohler55/oj@v3.10.2...v3.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…ies (wyeworks#2229)

# Release Notes

Fix error when modifying an order detail with auto-scaled accessories.

# Additional Context

To replicate:

- Create an instrument with an auto-scaled accessory
- Complete a reservation and add the auto-scaled accessory
- Visit the order detail popup
- Change the actual times
- Submit and you should get this error
# Release Notes

Fix print styles on Formio embeds.

# Additional Context

When I changed from using raw html to more rails/haml-y syntax in wyeworks#2212, I switched to using `stylesheet_link_tag`. According to the [docs](https://apidock.com/rails/ActionView/Helpers/AssetTagHelper/stylesheet_link_tag), "For historical reasons, the ‘media’ attribute will always be present and defaults to “screen”, so you must explicitly set it to “all” for the stylesheet(s) to apply to all media types.".

So, because it was now `media="screen"`, the styles were not being applied to print.
# Release Notes

Bug fix: The XLS spreadsheet was not being created for journals. The bug has not made it to any of the staging environments.

# Additional Context

After the refactoring in wyeworks#2206, we needed to make the format lookup symbol/string agnostic
Bumps [will_paginate](https://github.com/mislav/will_paginate) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/mislav/will_paginate/releases)
- [Commits](mislav/will_paginate@v3.2.1...v3.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
# Release Notes

Improve product search responses, especially when searching for multiple words. For now, this only applies to MySQL.

For example: searching for "lsc W1 spinning disk" might return "LSC Andor Spinning Disk" and "LSC Nikon A1RSi" where it's matches a single word. Precedence is given to the result that matches more words. Before it would return no results.

# Additional Context

This uses MySQL's full text searching functionality.

It still may not be perfect, especially for things like misspellings, or word roots, but it's the best we can do without a fuller search engine, which would likely require additional infrastructure (e.g. Sphinx).

I have code that works for Oracle as well, but there are problems with the oracle adapter currently. I have PRs out for it, but I don't know how long that will take to go in. In the meantime, I'll open a PR here for it so you can see it. Some of the code in this PR may feel a little over-flexible, but it made sense with the Oracle support.
…orks#2242)

In the Raw Export for “Timed Services”, the “Charge For” column will populate with “Minutes”
# Release Notes

Update label for enabling the instrument dashboard.

# Additional Context

See wyeworks#2205 for the original implementation.
…s#2238)

# Release Notes

Fix ordering of product groups on facility homepage.

# Additional Context

I have no idea how I missed adding the `sorted` scope in the original PR.
…2243)

# Release Notes

Fixes a hard error on global "Users > Payment Sources". (`/facilities/all/accounts`).

# Additional Context

This was broken by the removal of the `accountsfacility_id` column in wyeworks#1863. We didn't have a test around that view, which would have caught it. This changes the behavior slightly: before we were only showing global accounts before. But when you searched that restriction when away. Now on the page, it'll include credit card and POs. I also added a facility column that will appear in the cross-facility context.

# Screenshot

![Screen Shot 2020-03-06 at 2 13 10 PM](https://user-images.githubusercontent.com/1099111/76119228-9eba8f80-5fb4-11ea-8028-2f9c992e46ad.png)
# Release Notes

Tech task: Fix circular dependency issue happening in Dartmouth.

# Additional context

I switched these over to `cattr_accessor` because I find the syntax a lot more readable. This came in from the product grouping in wyeworks#2215. 

I'm not quite sure exactly why, but enabling the SecureRooms engine prevents this error from happening. I know that it appends to the `Product.types` array, but why it doesn't cause the circular dependency, I don't really understand.

That's why this was fine in open and NU since they both have the engine enabled while Dartmouth does not.
# Release Notes

Tech task: Fix spurious test failure.

# Additional Context

```
Failure/Error: click_link "Clone Payment Source Memberships"

Capybara::Ambiguous:
  Ambiguous match, found 2 elements matching visible link "Clone Payment Source Memberships"

./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/node/finders.rb:300:in `block in synced_resolve'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/node/base.rb:83:in `synchronize'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/node/finders.rb:291:in `synced_resolve'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/node/finders.rb:52:in `find'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/node/actions.rb:42:in `click_link'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/session.rb:759:in `block (2 levels) in <class:Session>'
./vendor/bundle/ruby/2.5.0/gems/capybara-3.31.0/lib/capybara/dsl.rb:58:in `block (2 levels) in <module:DSL>'
./spec/system/admin/clones_account_memberships_spec.rb:37:in `block (3 levels) in <top (required)>'
```

This was super tricky to figure out. What it came down to is we have a couple users whose sequence of name coming out of the factory is out of sync with the sequence of email addresses. I think this happens where if you explicitly set the value in a `FactoryBot.create` it doesn't increment the sequence, and I know we do that in a few places.

So we had one user with name "User 724" and email "user722@example.com" and then another user with "User 726" and "user724@example.com". Because our user search is pretty generous (in order to support first name, last name, and full name searching), a search for "User 724" matches the first user's name and the second user's email address. 

That's why we were seeing two results come back which was then confusing capybara. I figured this out by throwing this code in there so I could actually see what was happening on the failures on CI. There's probably a way to do `save_and_open_page` on CI, but I don't know how.

```ruby
unless page.has_link?("Clone Payment Source Memberships", count: 1)
  raise "Too many links for user: #{original_user.name} -- All: #{User.all.map(&:name) }\n#{page.body}"
end
```

The detail is the query gets converted to `%user%724%` and then matched against the various columns. In general I'm ok with it being as lenient as it is and no one's complained about it. Better for the search to return more results than to not return a result.
# Release Notes

Fix "Add to Order" issue where the defaults may be coming from the wrong order detail.

# Additional Context

See wyeworks#2207 for the original implementation

In Oracle, it's possible that the IDs of the rows in `order_details` (or really in any table) may not be assigned in the order of the sequence. This is due to the way that Oracle caches values in a sequence: it preallocates them into a cache, but different nodes get their own cache. So you can end up with an `ORDER_BY id` being different than `ORDER BY created_at`.

In the future, we should consider how to ensure proper ordering (see the references), but that is out of scope of the current ticket.

A couple references:
https://asktom.oracle.com/pls/apex/f?p=100:11:::NO::P11_QUESTION_ID:9539374000346423410
https://stackoverflow.com/questions/13513936/oracle-sequence-value-are-not-ordered
https://stackoverflow.com/questions/4866959/oracle-rac-and-sequences
# Release Notes

Display "Inactive" next to product names in the product group management pages.

# Additional Context

Per the client:

> This would be helpful in terms of organizing currently Active products versus Inactive products when viewing, creating, and editing Display Groups.

I also moved "Hidden" in here to allow some sharing of code with the homepage (and getting rid of the hard-coded string in the view).
@joshea0 joshea0 requested a review from jhanggi as a code owner March 11, 2020 17:01
@joshea0 joshea0 force-pushed the latest_from_open_2020_03_11 branch from 5691211 to 51ad695 Compare March 11, 2020 17:10
joshea0 added 3 commits March 16, 2020 13:00
This test was failing because it was doing a case-sensitive search
for "Ordered Date..." but UConn's styles have added some styles
with `text-transform: uppercase` which was causing this test to break.

Adding a customer matcher have_content_i resolves this problem in a way
that should be suitable for nucore-uconn and nucore-open
@joshea0 joshea0 removed the request for review from jhanggi March 17, 2020 13:51
@joshea0
Copy link
Author

joshea0 commented Mar 23, 2020

Something went wrong during this merge process so I'm deleting this and starting again from a clean slate.

@joshea0 joshea0 closed this Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants