-
Notifications
You must be signed in to change notification settings - Fork 100
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
November 2024 Release #8053
Conversation
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]
Features/custom docx reports
…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]
…ersions [SCI-11295]
Fix recording of asset authors when duplicating stuff and restoring versions [SCI-11295]
Add default docx template if nothing is selected [SCI-11300]
Bump version to 1.38.0
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', |
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.
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'); |
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.
'previousDocxTemplate' is never reassigned. Use 'const' instead prefer-const
}; | ||
|
||
$('#docxTemplateSelector').data('selected-template', template); | ||
$.get($('#docxTemplateSelector').data('valuesEditorPath'), params, function(result) { |
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.
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 |
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.
Expected property shorthand object-shorthand
|
||
function loadDocxTemplate() { | ||
const template = dropdownSelector.getValues('#docxTemplateSelector'); | ||
let params = { |
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.
'params' is never reassigned. Use 'const' instead prefer-const
}).length; | ||
|
||
if (filledFieldsCount === 0) { | ||
loadDocxTemplate(); |
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.
'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() { |
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.
Missing space before function parentheses space-before-function-paren
Unexpected unnamed function func-names
return; | ||
} | ||
|
||
let filledFieldsCount = $('.report-template-values-container.docx') |
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.
'filledFieldsCount' is never reassigned. Use 'const' instead prefer-const
noEmptyOption: true, | ||
selectAppearance: 'simple', | ||
disableSearch: true, | ||
onSelect: function() { |
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.
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') |
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.
'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) |
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.
[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; |
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.
Assignment to property of function parameter 'n' no-param-reassign
}); | ||
}); | ||
|
||
$('#deleteRepositoryAssetValueModal').on('hidden.bs.modal', function() { |
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.
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() { |
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.
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'); |
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.
'$label' is never reassigned. Use 'const' instead prefer-const
@@ -0,0 +1,42 @@ | |||
# frozen_string_literal: true | |||
|
|||
module Reports::Docx::DrawResults |
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.
[Correctable] Style/ClassAndModuleChildren: Use nested module/class definitions instead of compact style.
extend ActiveSupport::Concern | ||
|
||
class_methods do | ||
def has_one_versioned_attached(name) |
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.
Naming/PredicateName: Rename has_one_versioned_attached to has_one_versioned_attached?.
module VersionedAttachments | ||
extend ActiveSupport::Concern | ||
|
||
class_methods do |
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.
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) |
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.
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? |
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.
[Correctable] Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
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.
Approved
No description provided.