Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Dec 2, 2021
2 parents 5653ebc + 7cac4cb commit dd94405
Show file tree
Hide file tree
Showing 39 changed files with 402 additions and 20,893 deletions.
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.22.2] - 2021-12-02

### Changed
- Upped from 40 to 500 the cutoff point at which updating a collecing event will trigger a DwcOccurrence rebuild
- Added a `url_base` option when rendering metadata partial

### Fixed
- Author by first letter (/people.json) [2697]
- Loan recipient helper methods were confused with loan helper methods
- Subsequent combination link in new taxon name task [#2695]
- Unable to create tags in batches due to Ruby 3 syntax changes.
- Observation matrices crashing due to response pagination bug.
- Unable to create namespaces due to debug code accidentally added.

[#2697]: https://github.com/SpeciesFileGroup/taxonworks/issues/2697
[#2695]: https://github.com/SpeciesFileGroup/taxonworks/issues/2695

## [0.22.1] - 2021-12-01

### Added
Expand Down Expand Up @@ -2109,7 +2126,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532

[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.22.1...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.22.2...development
[0.22.2]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.22.1...v0.22.2
[0.22.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.22.0...v0.22.1
[0.22.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.3...v0.22.0
[0.21.3]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.2...v0.21.3
Expand Down
1 change: 0 additions & 1 deletion app/controllers/namespaces_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def edit
# POST /namespaces
# POST /namespaces.json
def create
byebug
@namespace = Namespace.new(namespace_params)

respond_to do |format|
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/observation_matrices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def index
render '/shared/data/all/index'
end
format.json {
@observation_matrices = ObservationMatrix.where(project_id: sessions_current_project_id)
@observation_matrices = ObservationMatrix.where(project_id: sessions_current_project_id).page(params[:page]).per(params[:per])
}
end
end
Expand All @@ -24,7 +24,7 @@ def show
end

def list
@observation_matrices = ObservationMatrix.with_project_id(sessions_current_project_id).page(params[:page])
@observation_matrices = ObservationMatrix.with_project_id(sessions_current_project_id).page(params[:page]).per(params[:per])
end

# GET /observation_matrices/new
Expand Down
13 changes: 9 additions & 4 deletions app/controllers/sequences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ class SequencesController < ApplicationController

before_action :set_sequence, only: [:show, :edit, :update, :destroy]

# GET /sequences
# GET /sequences.json
def index
@recent_objects = Sequence.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
render '/shared/data/all/index'
respond_to do |format|
format.html do
@recent_objects = Sequence.recent_from_project_id(sessions_current_project_id).order(updated_at: :desc).limit(10)
render '/shared/data/all/index'
end
format.json {
@sequences = Sequence.where(project_id: sessions_current_project_id).page(params[:page]).per(params[:per] || 500)
}
end
end

# GET /sequences/1
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def batch_remove
# POST /tags/batch_create.json?keyword_id=123&object_type=CollectionObject&object_ids[]=123
def batch_create
if Tag.batch_create(
params.permit(:keyword_id, :object_type, object_ids: []).to_h.merge(user_id: sessions_current_user_id, project_id: sessions_current_project_id).symbolize_keys
**params.permit(:keyword_id, :object_type, object_ids: []).to_h.merge(user_id: sessions_current_user_id, project_id: sessions_current_project_id).symbolize_keys
)
render json: {success: true}
else
Expand Down
7 changes: 3 additions & 4 deletions app/helpers/loan_recipients_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module LoanRecipientsHelper

def loan_recipient_tag(loan)
return nil if loan.nil?
recipients = loan.loan_recipients.collect{|lr| person_tag(lr)}.join.html_safe
recipients.blank? ? 'No recipients defined!' : recipients
def loan_recipient_tag(loan_recipient)
return nil if loan_recipient.nil?
person_tag(loan_recipient.person)
end

def loan_recipient_link(loan)
Expand Down
5 changes: 5 additions & 0 deletions app/helpers/loans_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ def loan_tag(loan)
def label_for_loan(loan)
s = "loan #{loan.id}"
s << loan.identifiers&.pluck(:cached)&.join(', ')
end

def loan_recipients_tag(loan)
return nil if loan.nil?
recipients = loan.loan_recipients.collect{|lr| person_tag(lr)}.join.html_safe
recipients.blank? ? 'No recipients defined!' : recipients
end

def loan_autocomplete_tag(loan)
Expand Down
6 changes: 2 additions & 4 deletions app/helpers/workbench/object_helper.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@

# A metamodule- helper methods for object related manipulations in other helpers
module Workbench::ObjectHelper

# @return [ActiveRecord object]
# metamorphosize is defined in the conern Shared::IsData, if its available use it on the object
# metamorphosize is defined in the concern Shared::IsData, if its available use it on the object
def metamorphosize_if(object)
if object.respond_to?(:metamorphosize)
object.metamorphosize
else
object
end
end

# @return [String]
# the member path base for the object, object should be metamorphosized before passing.
def member_base_path(object)
Expand All @@ -29,5 +28,4 @@ def helper_module(object)
(object.class.name + 'Helper').constantize
end


end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import notes from './book'
import tags from './tag'
import attribution from './attribution'
import pin from './pin'
import verifiers from './verifier'

const Icons = {
alternate_values,
Expand All @@ -23,7 +24,8 @@ const Icons = {
tags,
protocol_relationships,
attribution,
pin
pin,
verifiers
}

export default Icons

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<block-layout
:spinner="!taxon.id"
anchor="original-combination">
anchor="subsequent-combination">
<template #header>
<h3>Subsequent combination</h3>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modal-component
v-if="show"
@close="reset">
<template>
<template #header>
<h3>Select observation matrix to open MRC or Image matrix</h3>
</template>
<template #body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<template v-for="(row, index) in tableRanks.data">
<tr
v-if="withOtus ? row[1] : true && filterRow(index)"
class="contextMenuCells btn btn-neutral"
class="contextMenuCells"
:class="{ even: (index % 2)}">
<td>
<input
Expand Down
2 changes: 1 addition & 1 deletion app/models/collecting_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ def set_cached

def update_dwc_occurrences
# reload is required!
if collection_objects.count < 40
if collection_objects.count < 501
collection_objects.reload.each do |o|
o.set_dwc_occurrence
end
Expand Down
Loading

0 comments on commit dd94405

Please sign in to comment.