Skip to content

5573-one-step-workflow #6112

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

Merged
merged 7 commits into from
Jul 28, 2023
Merged

5573-one-step-workflow #6112

merged 7 commits into from
Jul 28, 2023

Conversation

alishaevn
Copy link
Contributor

@alishaevn alishaevn commented Jul 19, 2023

refs

Summary

works in a one step workflow are able to be approved by a manager.

Demo

Screen.Recording.2023-07-18.at.07.22.01.PM.mp4

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • logged in as an admin, create or find an admin set that has been set to use the one step mediated deposit workflow
  • edit >> participants, add a non admin as a manager
  • create/update a work to belong to the above admin set
  • log out, then in as the managing user
  • dashboard >> review submissions
  • click on the title of a work in the "under review" tab
  • click the "review and approval" tab and notice the options

Detailed Description

we needed to update Hyrax::ActiveFedoraDummyModel#to_global_id so that the gid created for valkyrie works matches what is found in the "sipity_entries" database table. now, when @query_cache is set/updated in active record, it can find the appropriate data.

dassie
w = GenericWork.find '6682x392q'
=> #<GenericWork id: "6682x392q", head: [#<ActiveTriples::Resource:0x69ba4 ID:<http://fcrepo:8080/rest/dev/66/82/x3/92/6682x392q/list_source#g436800>>], tail: [#<ActiveTriples::Resource:0x69bb8 ID:<http://fcrepo:8080/rest/dev/66/82/x3/92/6682x392q/list_source#g436800>>], depositor: "admin@example.com", title: ["Stephen Curry"], date_uploaded: "2023-05-26 14:13:38", date_modified: "2023-07-17 17:17:19", state: #<ActiveTriples::Resource:0x69bcc ID:<http://fedora.info/definitions/1/0/access/ObjState#active>>, proxy_depositor: nil, on_behalf_of: nil, arkivo_checksum: nil, owner: nil, alternative_title: [], label: nil, relative_path: nil, import_url: nil, resource_type: [], creator: ["NBA"], contributor: [], description: ["ballers"], abstract: [], keyword: [], license: [], rights_notes: [], rights_statement: ["http://rightsstatements.org/vocab/InC/1.0/"], access_right: [], publisher: [], date_created: [], subject: [], language: [], identifier: [], based_near: [], related_url: [], bibliographic_citation: [], source: [], access_control_id: "632919c4-7a4a-40e0-aee1-3f53ceb78b1a", representative_id: "m326m172d", thumbnail_id: "m326m172d", rendering_ids: [], admin_set_id: "5999n3367", embargo_id: "106c7413-645e-463d-b55d-98f733bc679d", lease_id: "68c3673f-cce8-4d97-88fc-ddc345d6276f">

Sipity::Entity(w)
=> #<Sipity::Entity:0x00007fc2f7e08078
 id: 1,
 proxy_for_global_id: "gid://dassie/GenericWork/6682x392q",
 workflow_id: 1,
 workflow_state_id: 1,
 created_at: Fri, 26 May 2023 14:13:47.494859000 UTC +00:00,
 updated_at: Fri, 26 May 2023 14:13:47.751816000 UTC +00:00>

image

koppie
w = Hyrax.query_service.find_by(id: '3de17d25-aa1e-40b9-aa9b-90b82ba455f4')
=> #<Monograph id=#<Valkyrie::ID:0x00007fad7e5a0dd8 @id="3de17d25-aa1e-40b9-aa9b-90b82ba455f4"> internal_resource="Monograph" created_at=Mon, 17 Jul 2023 16:41:48.704481000 UTC +00:00 updated_at=Mon, 17 Jul 2023 16:41:49.461452000 UTC +00:00 new_record=false alternate_ids=[] embargo=nil lease=nil title=["Steph Curry"] date_modified=Mon, 17 Jul 2023 16:41:49 +0000 date_uploaded=Mon, 17 Jul 2023 16:41:48 +0000 depositor="admin@example.com" admin_set_id=#<Valkyrie::ID:0x00007fad7e0dff88 @id="d7db6702-80f5-4b7c-a73b-8e4b8ad12ece"> member_ids=[] member_of_collection_ids=[] on_behalf_of=nil proxy_depositor=nil state=#<RDF::URI:0x5bdd8 URI:http://fedora.info/definitions/1/0/access/ObjState#inactive> rendering_ids=[] representative_id=nil thumbnail_id=nil abstract=[] access_right=[] alternative_title=[] based_near=[] bibliographic_citation=[] contributor=[] creator=["NBA"] date_created=[] description=[] identifier=[] import_url=nil keyword=[] publisher=[] label="" language=[] license=[] relative_path=nil related_url=[] resource_type=[] rights_notes=[] rights_statement=[] source=[] subject=[] monograph_title=nil record_info="123" place_of_publication="" genre="" series_title="" target_audience="" table_of_contents="" date_of_issuance=nil>

Sipity::Entity(w)
=> #<Sipity::Entity:0x00007fad7e26d558
 id: 28,
 proxy_for_global_id: "gid://nurax-pg/Hyrax::ValkyrieGlobalIdProxy/3de17d25-aa1e-40b9-aa9b-90b82ba455f4",
 workflow_id: 4,
 workflow_state_id: 6,
 created_at: Mon, 17 Jul 2023 16:41:48.853063000 UTC +00:00,
 updated_at: Mon, 17 Jul 2023 16:41:48.987582000 UTC +00:00>

image

@samvera/hyrax-code-reviewers

we needed to update Hyrax::ActiveFedoraDummyModel#to_global_id so that the gid created for valkyrie works matches what is found in the "sipity_entries" database table. now, when @query_cache is set/updated in active record, it can find the appropriate data.
@alishaevn alishaevn added notes-valkyrie Release Notes: Valkyrie specific notes-bugfix Release Notes: Fixed a bug labels Jul 19, 2023
bkiahstroud
bkiahstroud previously approved these changes Jul 19, 2023
orangewolf
orangewolf previously approved these changes Jul 19, 2023
@alishaevn alishaevn dismissed stale reviews from bkiahstroud and orangewolf via 64231e4 July 26, 2023 15:36
alishaevn and others added 3 commits July 26, 2023 10:38
… Valkyrie, to also get the correct URI::GID set.

co-authored-by: braydon <braydon.justice@1268456bcltd.ca>
…id to check whether the item being examined was a Valkyrie::Resource, and not whether Hyrax.config.use_valkyrie? is true.

ref: #5573
@alishaevn alishaevn merged commit 90d49e6 into main Jul 28, 2023
@alishaevn alishaevn deleted the 5573-one-step-workflow branch July 28, 2023 14:26
@alishaevn alishaevn linked an issue Aug 7, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-bugfix Release Notes: Fixed a bug notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Works in one-step workflow cannot be approved by a manager
4 participants