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

November 2024 Release #8053

Merged
merged 196 commits into from
Nov 20, 2024
Merged

November 2024 Release #8053

merged 196 commits into from
Nov 20, 2024

Conversation

artoscinote
Copy link
Contributor

No description provided.

rekonder and others added 30 commits July 30, 2024 13:37
Enable protocol template renaming [SCI-10851]
…m-docx-reports

Add basic support for custom templates docx [SCI-10967]
…ide-metadata-from-reports

Add exclude metadata from reports [SCI-10978]
Fix docx templates [SCI-10988]
Improve report wizard [SCI-10989]
Update caracal version [SCI-10985]
Fix caracal library version [SCI-10985]
Fix repositories component for docx [SCI-10988]
Fix moving of dropdowns on report wizard [SCI-11016]
Implement report template loader [SCI-10999]
Update exclude metadata setting [SCI-11017]
Remove tag for attached files in docx [SCI-11027]
Require docx template files on initialization [SCI-10999]
aignatov-bio and others added 22 commits November 14, 2024 11:37
…items

Fix permission for archived rows and download link [SCI-11284][SCI-11285]
…ission-for-protocol-template

Fix view permission for protocol template [SCI-11256]
…odals-for-api-files

Fix file versions for api flies [SCI-11288]
Fix generating of reports [SCI-11291][SCI-11292]
Fix recording of asset authors when duplicating stuff and restoring versions [SCI-11295]
Add default docx template if nothing is selected [SCI-11300]
if settings.dig(:task, :file_results_previews) && ActiveStorageFileUtil.previewable_document?(asset&.file&.blob)
text " #{I18n.t('projects.reports.elements.result_asset.full_preview_attached')}", color: color[:gray]
unless settings['exclude_timestamps']
text ' ' + I18n.t('projects.reports.elements.result_asset.user_time',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringConcatenation: Prefer string interpolation to string concatenation.

@@ -1448,7 +1556,9 @@ function reportHandsonTableConverter() {
.on('hide.bs.modal', function() {
if (!$('#templateReportWarningModal').hasClass('skip-hide-event')) {
let previousTemplate = $('#templateSelector').data('selected-template');
let previousDocxTemplate = $('#docxTemplateSelector').data('selected-template');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'previousDocxTemplate' is never reassigned. Use 'const' instead prefer-const

};

$('#docxTemplateSelector').data('selected-template', template);
$.get($('#docxTemplateSelector').data('valuesEditorPath'), params, function(result) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before function parentheses space-before-function-paren
Unexpected function expression prefer-arrow-callback
Unexpected unnamed function func-names

const template = dropdownSelector.getValues('#docxTemplateSelector');
let params = {
project_id: dropdownSelector.getValues('#projectSelector'),
template: template
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected property shorthand object-shorthand


function loadDocxTemplate() {
const template = dropdownSelector.getValues('#docxTemplateSelector');
let params = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'params' is never reassigned. Use 'const' instead prefer-const

}).length;

if (filledFieldsCount === 0) {
loadDocxTemplate();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'loadDocxTemplate' was used before it was defined no-use-before-define

}

let filledFieldsCount = $('.report-template-values-container.docx')
.find('input.sci-input-field, textarea.sci-input-field').filter(function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before function parentheses space-before-function-paren
Unexpected unnamed function func-names

return;
}

let filledFieldsCount = $('.report-template-values-container.docx')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'filledFieldsCount' is never reassigned. Use 'const' instead prefer-const

noEmptyOption: true,
selectAppearance: 'simple',
disableSearch: true,
onSelect: function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected method shorthand object-shorthand
Missing space before function parentheses space-before-function-paren
Unexpected unnamed method 'onSelect' func-names

reCheckContinueButton();
return;
}

let filledFieldsCount = $('.report-template-values-container')
let filledFieldsCount = $('.report-template-values-container.pdf')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'filledFieldsCount' is never reassigned. Use 'const' instead prefer-const

Merge pull request #7979 from scinote-eln/develop
'pdf', '--outdir',
work_dir, input.path
)
unless success && File.file?(preview_file)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Correctable] Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||.

axios.post(this.markAllNotificationsUrl)
.then(() => {
this.notifications = this.notifications.map((n) => {
n.attributes.checked = true;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment to property of function parameter 'n' no-param-reassign

});
});

$('#deleteRepositoryAssetValueModal').on('hidden.bs.modal', function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before function parentheses space-before-function-paren
Unexpected function expression prefer-arrow-callback
Unexpected unnamed function func-names

let $input = $(this).data('cellInput');
let $label = $(this).data('cellLabel');

$('#confirmAssetValueDelete').one('click', function() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before function parentheses space-before-function-paren
Unexpected function expression prefer-arrow-callback
Unexpected unnamed function func-names

$('#deleteRepositoryAssetValueModal').on('shown.bs.modal', function() {
let $fileBtn = $(this).data('cellFileBtn');
let $input = $(this).data('cellInput');
let $label = $(this).data('cellLabel');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'$label' is never reassigned. Use 'const' instead prefer-const

@@ -0,0 +1,42 @@
# frozen_string_literal: true

module Reports::Docx::DrawResults
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Correctable] Style/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.

extend ActiveSupport::Concern

class_methods do
def has_one_versioned_attached(name)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming/PredicateName: Rename has_one_versioned_attached to has_one_versioned_attached?.

module VersionedAttachments
extend ActiveSupport::Concern

class_methods do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/BlockLength: Block has too many lines. [32/25]

def self.deep_clone_assets(assets_to_clone)
# There is an issue with Delayed Job delayed methods, ruby 3, and keyword arguments (https://github.com/collectiveidea/delayed_job/issues/1134)
# so we're forced to use a normal argument with default value.
def self.deep_clone_assets(assets_to_clone, include_file_versions = false)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use include_file_versions: false instead of include_file_versions = false.

text I18n.t('projects.reports.elements.module.status')
text ' '
text "[#{status.name}]", color: (status.light_color? ? '000000' : status.color.delete('#'))
if my_module.completed?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Correctable] Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.

Copy link
Contributor

@aignatov-bio aignatov-bio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@artoscinote artoscinote merged commit 4c57d97 into master Nov 20, 2024
5 checks passed
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.

5 participants