Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Commits
03ceb837
Commit
03ceb837
authored
1 year ago
by
Gyan Gupta
Browse files
Options
Downloads
Patches
Plain Diff
some changes
parent
d0efa3f0
Branches
bug_fix/334-folder-name-duplication-issue
No related tags found
1 merge request
!287
Fixed duplication title issue for Subject, Session And Modality
Pipeline
#13443
failed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hyrax/app/models/complex_modality.rb
+1
-1
1 addition, 1 deletion
hyrax/app/models/complex_modality.rb
hyrax/app/models/complex_session.rb
+1
-1
1 addition, 1 deletion
hyrax/app/models/complex_session.rb
hyrax/app/models/complex_subject.rb
+1
-1
1 addition, 1 deletion
hyrax/app/models/complex_subject.rb
with
3 additions
and
3 deletions
hyrax/app/models/complex_modality.rb
+
1
−
1
View file @
03ceb837
...
...
@@ -62,7 +62,7 @@ class ComplexModality < ActiveRecord::Base
suffix
=
1
new_title
=
self
.
modality_title
while
ComplexModality
.
where
(
modality_title:
new_title
).
where
.
not
(
id:
self
.
id
).
present?
while
ComplexModality
.
where
(
modality_title:
new_title
,
parent_source_identifier:
complex_session
.
source_identifier
).
where
.
not
(
id:
self
.
id
).
present?
new_title
=
"
#{
self
.
modality_title
}
_
#{
suffix
}
"
suffix
+=
1
end
...
...
This diff is collapsed.
Click to expand it.
hyrax/app/models/complex_session.rb
+
1
−
1
View file @
03ceb837
...
...
@@ -63,7 +63,7 @@ class ComplexSession < ActiveRecord::Base
suffix
=
1
new_title
=
session_title
while
ComplexSession
.
where
(
session_title:
new_title
).
where
.
not
(
id:
self
.
id
).
present?
while
ComplexSession
.
where
(
session_title:
new_title
,
parent_source_identifier:
complex_subject
.
source_identifier
).
where
.
not
(
id:
self
.
id
).
present?
new_title
=
"
#{
self
.
session_title
}
_
#{
suffix
}
"
suffix
+=
1
end
...
...
This diff is collapsed.
Click to expand it.
hyrax/app/models/complex_subject.rb
+
1
−
1
View file @
03ceb837
...
...
@@ -64,7 +64,7 @@ class ComplexSubject < ActiveRecord::Base
suffix
=
1
new_title
=
self
.
subject_title
while
ComplexSubject
.
where
(
subject_title:
new_title
).
where
.
not
(
id:
self
.
id
).
present?
while
ComplexSubject
.
where
(
subject_title:
new_title
,
parent_source_identifier:
crc_dataset
.
source
.
first
).
where
.
not
(
id:
self
.
id
).
present?
new_title
=
"
#{
self
.
subject_title
}
_
#{
suffix
}
"
suffix
+=
1
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment