Skip to content

Commit

Permalink
Add 'Aggregating' state (#2315)
Browse files Browse the repository at this point in the history
This adds a new state 'Aggregating', used by the University of
Gothenburg for AIPs that are being created from multiple SIPs
over time. IPs in this state should be in the 'Checkpoint' view
for now.

This also makes links to such packages in the archival description
lead to the view where the package can be found.

Co-authored-by: Anton Neld <[email protected]>
  • Loading branch information
AntonNeld and Anton Neld authored Jun 10, 2024
1 parent abb2487 commit 7b3e212
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions ESSArch_Core/frontend/static/frontend/lang/en/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default ($translateProvider: ng.translate.ITranslateProvider) => {
ACCESS_WORKAREA: 'Workspace access',
ACCESS_WORKSPACE: 'Workspace access',
ADVANCED_FILTERS_ON: 'Advanced filter active',
AGGREGATING: 'Aggregating',
ARCHIVAL_INSTITUTION: 'Archival Institution',
ARCHIVAL_INSTITUTION_DESC: 'Archival institution',
ARCHIVIST_ORGANIZATION: 'Archivist organization',
Expand Down
1 change: 1 addition & 0 deletions ESSArch_Core/frontend/static/frontend/lang/sv/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default ($translateProvider: ng.translate.ITranslateProvider) => {
ACCESS_WORKAREA: 'Arbetsyta åtkomst',
ACCESS_WORKSPACE: 'Arbetsyta åtkomst',
ADVANCED_FILTERS_ON: 'Avancerad filtrering aktiv',
AGGREGATING: 'Aggregerar',
ARCHIVAL_INSTITUTION: 'Arkivinstitution',
ARCHIVAL_INSTITUTION_DESC: 'Arkivinstitution',
ARCHIVIST_ORGANIZATION: 'Arkivorganisation',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default class IpApprovalCtrl {
constructor($scope, $controller, $rootScope, $translate, ContextMenuBase) {
const vm = this;
const ipSortString = ['Received', 'Preserving'];
const ipSortString = ['Aggregating', 'Received', 'Preserving'];
$controller('BaseCtrl', {$scope: $scope, vm: vm, ipSortString: ipSortString, params: {}});

//Request form data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,26 @@ <h4 ng-if="vm.record.type">{{vm.record.type.name}}</h4>
</button>
</div>
</div>
<div class="detail-field pt-base" ng-if="vm.record.information_package">
<div
class="detail-field pt-base"
ng-if="vm.record.information_package && vm.record.information_package.state == 'Preserved'"
>
<label> {{'INFORMATION_PACKAGE' | translate}}:&nbsp; </label>
<a ui-sref="home.access.accessIp({id: vm.record.information_package.id})">
{{vm.record.information_package.label ? vm.record.information_package.label :
vm.record.information_package.object_identifier_value}}
</a>
</div>
<div
class="detail-field pt-base"
ng-if="vm.record.information_package && ['Aggregating', 'Received', 'Preserving'].includes(vm.record.information_package.state)"
>
<label> {{'INFORMATION_PACKAGE' | translate}}:&nbsp; </label>
<a ui-sref="home.ingest.ipApproval({id: vm.record.information_package.id})">
{{vm.record.information_package.label ? vm.record.information_package.label :
vm.record.information_package.object_identifier_value}}
</a>
</div>
<div ng-if="vm.record.appraisal_job">
<result-field
label="{{'ARCHIVE_MAINTENANCE.APPRAISAL_JOB' | translate}}"
Expand Down
2 changes: 1 addition & 1 deletion ESSArch_Core/tags/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ class Meta(LocationSerializer.Meta):
class TagVersionInformationPackageSerializer(serializers.ModelSerializer):
class Meta:
model = InformationPackage
fields = ('id', 'object_identifier_value', 'label',)
fields = ('id', 'object_identifier_value', 'label', 'state')


class TagVersionNestedSerializer(serializers.ModelSerializer):
Expand Down
3 changes: 2 additions & 1 deletion ESSArch_Core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ def UpdateIPStatus(self, status, prev=None):
t.save()
ip.state = status
ip.save()
ip_state_dict = {'Creating': gettext('Creating'),
ip_state_dict = {'Aggregating': gettext('Aggregating'),
'Creating': gettext('Creating'),
'Created': gettext('Created'),
'Transforming': gettext('Transforming'),
'Transformed': gettext('Transformed'),
Expand Down

0 comments on commit 7b3e212

Please sign in to comment.