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

Sync request #59

Open
19 tasks done
BBGuy opened this issue Jan 20, 2015 · 22 comments
Open
19 tasks done

Sync request #59

BBGuy opened this issue Jan 20, 2015 · 22 comments

Comments

@BBGuy
Copy link
Member

BBGuy commented Jan 20, 2015

Sync request are requests to use an asset for visual media (for example I want to use Under pressure” in a TV commercial).
If the owner (holder of the copyright) accepts the request he will grant a license

Implementation:
We will create a Sync request node type that will have initially the following fields

  • Asset
  • Requested by
  • Description
  • State

The sync request will also create Entity messages (see #52 ) for both asset owners and request owner

Dev

  • Create basic entity
  • Create link for new sync request
  • Create a Tab view on for the asset.
  • Create rule(s) for new request.
  • Fix the views "Access: Asset access" to work with the new tab view, update to work with tabbed view.
  • Add state field
  • create rule links for state changes: Approve, Reject. In progress to be on live
  • Create rule(s) for state change notifications.
  • Create rule(s) for new comment notifications.
  • allow access to request only to: request owner, asset owner & kendra admin
  • Create new Sync page and views

Deploy

@BBGuy
Copy link
Member Author

BBGuy commented Jan 20, 2015

Entity created on dev

@andystiller
Copy link
Contributor

The format for using Entity Reference Prepopulate is:

In order to pre-populate an entity reference field you have to supply the parameter in the URL.
The structure is
node/add/article?[field_ref]=[id]

Where [field_ref] is the name of the entity reference field and [id] is
the id of the entity being referenced.

  • Entity reference prepopulate readme.txt

To add Sync request for for http://dev.hub.kendra.org/content/stairway-heaven the link would be:
node/add/sync-request?field_sr_asset=151

Where field_sr_asset is the Entity Reference field in the Sync Request and 151 is the node number of Stairway to Heaven.

@BBGuy
Copy link
Member Author

BBGuy commented Jan 20, 2015

Create new sync request block

I added the "Make a new Sync request" to the asset panel using "new custom content" with the following

<div><a href="/node/add/sync-request?field_sr_asset=%node:nid" class="btn btn-primary">Make a new Sync request</a></div>

Added the Sync request: Create new content permissions to to authenticated user

@andystiller
Copy link
Contributor

I have created and exported a new rule to send a message and email when a new Sync Request is created https://www.dropbox.com/s/ykowvh23zfcjj10/rule_sync_request_created.txt?dl=0.

@BBGuy
Copy link
Member Author

BBGuy commented Jan 20, 2015

I created the view to list assets request in https://www.dropbox.com/s/25wy1lwtd193amx/view_export_asset_sync_requests.txt?dl=0

@BBGuy
Copy link
Member Author

BBGuy commented Jan 20, 2015

Hi @dahacouk me @andystiller made good progress and we have the basic functionality on dev.
The next stage is adding the state field and we need to agree what the basic functionality involved.
We have mentioned the following before:

  • New
  • Acknowledge receipt
  • Approved
  • Rejected

However to implement this we need some workflow control that has a few options.
Alternatively we can come up with some simplified workflow: for approved / not approved only.
What do you think?

@dahacouk
Copy link
Member

Are the states on the recipient end or sender end?

I like to use "Delivered" and "Read" as these are common terms used in messaging systems, yes? But I guess these are for the sender.

Would the recipient see "New" and "Read" or "Unread"?

We also need a mechanism for starting a conversation about the sync request – so it's a kind of "Maybe" state (or "In discussion"). But I like "Maybe".

@BBGuy
Copy link
Member Author

BBGuy commented Jan 21, 2015

The states are for the recipient (the asset owner) although in real life I am sure the sender may have actions of its own like cancel the request.
the states at this point are to do with the process of evaluating where the "Acknowledge receipt" is the starting point so maybe a mark as "In evaluation" is more appropriate.

@BBGuy
Copy link
Member Author

BBGuy commented Jan 27, 2015

Comments about state and access control.

workflow - not good as we need the related asset owner not the request owner the state field is on.

option 1
Field Permissions - to allow only editors to change directly
Request listing asset tab - update the custom view access to stop users from accessing
hook_node_access - to control access to the node.
rules links - for changing states.

other options:
look at using OG for content access.

@andystiller
Copy link
Contributor

I have created 5 rules that send a message and email when the request is approved or when a comment is added. The main rule when a comment is added is "Sync Request Comment Added" https://www.dropbox.com/s/m6z8rd9k5zvymhb/rules_sync_request_comment_added.txt?dl=0 this then uses 2 rules components "Is Sync Request Comment Author" https://www.dropbox.com/s/rawah8z26otf3n6/rules_is_sync_request_comment_author.txt?dl=0 and "Not Sync Request Comment Author" https://www.dropbox.com/s/7u4r3qfp5cv5vko/rules_not_sync_request_comment_author.txt?dl=0.

The new rules to send a message when a request is approved are "Sync Request Approved Author" (sync request author) https://www.dropbox.com/s/xd3wf2echngp0f9/rules_sync_request_approved_author.txt?dl=0 and "Sync Request Approved Asset Author" https://www.dropbox.com/s/bmq0bz1vz960pjj/rules_sync_request_approved_asset_author.txt?dl=0.

@BBGuy
Copy link
Member Author

BBGuy commented Jan 27, 2015

I create the state as:

0 - new
1 - In evaluation
2 - Approved
3 - Rejected

key is not visible to user and we can change the label/name

@BBGuy
Copy link
Member Author

BBGuy commented Jan 27, 2015

Create rule links for workflow and updated the view to sort and filter on those

@dahacouk
Copy link
Member

New with capital "N"?

@dahacouk
Copy link
Member

Could you list the states on the sender side?

@BBGuy
Copy link
Member Author

BBGuy commented Jan 28, 2015

Implemented code to restrict view to the request view however need to also control the request itself.
Also we should remove or restrict the "Recent content" on the "Notifications" page
To do:

  • Use page manager to layout the request page
  • Control access to the request page for author and related asset owner.
  • Remove or restrict the "Recent content" on the "Notifications" page - removed on both Dev & Live

@BBGuy
Copy link
Member Author

BBGuy commented Jan 28, 2015

Went over UI with @dahacouk and this is the result todo:

  • Add to the Asset "All sync requests" page a new action 'Comment' to go to the asset page
  • Create sync page
  • A new page in the main navigation called sync
  • Page to have two tabs 'In' and 'Out'
  • Each of the in and out to have smart filters on: State, User, Asset name
  • have the same actions as the Asset "All sync requests" page

@BBGuy
Copy link
Member Author

BBGuy commented Jan 29, 2015

Created a new page for Sync in out http://dev.hub.kendra.org/sync
All should be working now. needs full round testing and can go live.

@andystiller
Copy link
Contributor

Test the user creation, login, mesaging and sync requests.

Tests

Test Result
Check user requires a username, full name and email address to register ✅ Pass
Test that the administrator gets a useful email when the new user has registered ✅ Pass
Check that the user gets a registration email to say they have registered ✅ Pass
Test that an administrator can approve a user and that the user gets one time login email once approved ✅ Pass
Check that a helpful system message is created when the new user is approved ✅ Pass
Check that the new user can use the login link to login and change their password and picture. ✅ Pass
Log out then log in with the new user name and password ✅ Pass
Send a message from an Admin to the new user ✅ Pass
Send a message from the new user to an Admin ✅ Pass (see note 2)
Check that the new user can view an asset ✅ Pass (see note 3)
Check that the new user can create a Sync Request ✅ Pass (see note 3)
Check that the sync request author gets an email when a new request is created ✅ Pass
Check that the asset author gets an email when a new sync request is created on their asset ✅ Pass
Check that an administrator can approve a sync request ✅ Pass
Check that the sync request author gets a message and email when their request is approved. ✅ Pass
Check that a user cannot approve their own sync request ❌ Fail (see note 6)
Check that an (non admin) asset author can approve a sync request on their own asset ✅ Pass
Check that an (non admin) asset author cannot approve a sync request on another users asset ✅ Pass

Notes

  1. There is no contact page so a user needs to know the user name and the URL of the person they want to send a message to see issue Kendra Social interaction  #56.
  2. Need to add permissions to send a message and to view user profiles.
  3. It's difficult for a normal user to find an asset to make a sync request.
  4. The new user has an ''Add Asset'' button but doesn't have the permissions to add an asset.
  5. The state of a sync request can be changed to new even after the request is approved or rejected.
  6. A normal user can approve their own sync request when creating a new request. Once the request has bee created they cannot change the state. The state drop down needs to be hidden.
  7. The emails sent have a space missing in the subject field between the message title and the message subject see issue Minor issues with messaging system #57.

Additional go live tasks

  • Copy configuration from dev
  • Create rules for sending emails on all sync request state changes
  • Create a link so that Asset author can reject sync requests
  • Hide the sync request state drop down
  • Add permissions for authenticated users to send a message and to view user profiles.

@dahacouk
Copy link
Member

dahacouk commented Feb 4, 2015

  • Make the URL of the page be /sync-requests
  • Make the title of the page 'Sync requests'
  • Make first tab be 'All' or 'Null' but don't need to put anything in it. Hide it if you can. That's so we have breadcrumbs on all tabs.
  • Change the tab title from 'Sync In' to 'Received' and the URL to /sync-requests/received
  • Change the tab title from 'Sync Out' to 'Sent' and the URL to /sync-requests/sent
  • Change 'Sync out requests' to 'Sync requests sent'
  • Change 'Sync in requests' to 'Sync requests received'
  • Change 'Request state' to 'State'
  • Change 'Request author' to 'Author'
  • Change 'Apply' to 'Apply Smart Filter'
  • In the view results change the column heading 'Request State' to 'State'
  • Create new results tab for 'Approved' and include received sync requests
  • Create new results tab for 'Rejected' and include received sync requests

@andystiller
Copy link
Contributor

Tests Continued

Test Result
Check that the Sync Request author can comment on the request ✅ Pass
Check that the Asset Author can comment on the request ✅ Pass
Check that the appropriate email is sent to the comment author ✅ Pass
Check that the appropriate email is sent on to other interested users when a comment is created ✅ Pass

Notes

  1. The URL sent in the email is not a link. This is covered in issue Minor issues with messaging system #57
  2. The comments don't appear to be threaded. This may just be a styling /theme issue Various styling issues #64.

@andystiller
Copy link
Contributor

I have installed field permissions module and tested locally. We can use the field permissions module to make the sync request status field not editable for users that don't have administrator permissions.

@andystiller
Copy link
Contributor

I have copied the configuration from dev to live and added rules for sending emails on all sync request state changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants