[daisy] [JIRA] Updated: (DSY-414) Create User Field Type
Bruno Dumon (JIRA)
issues at cocoondev.org
Fri May 25 08:55:20 CDT 2007
[ http://issues.cocoondev.org//browse/DSY-414?page=all ]
Bruno Dumon updated DSY-414:
----------------------------
Component: Repository - schema
(was: Repository)
> Create User Field Type
> ----------------------
>
> Key: DSY-414
> URL: http://issues.cocoondev.org//browse/DSY-414
> Project: Daisy
> Type: New Feature
> Components: Frontend (wiki), Repository - querying and indexing, Repository - schema
> Versions: 1.5
> Reporter: Min Idzelis
> Priority: Minor
>
> It would be very useful to have "user" as field type.
> Currently, we can get by using a string field and using a selection list based on a query like this:
> select ownerLogin where ownerLogin is not null
> However, this only returns users that actually own a document in the system. There can be other users in the database that don't have documents and they will not show up.
> If this query can be made to work with the UserHasRole() function ( http://issues.cocoondev.org//browse/DSY-394 ) I could see this being even more useful.
> At a minimum, supporting the user field will need some supporting functions:
> currentUser(), user( 'loginId' ), user( x - userId),
> userName( userField), userLogin( userField), userId( userField)
> Usage in queries could look like:
> select name, userName($reviewer) where $reviewer = CurrentUser()
> or
> select name, userLogin($reviewer), where $reviewer = user( 'userlogin' )
> or
> select name, userId($reviewer) where $reviewer = user( 101 ) // user id
> There may be even more advanced functions - like one that returns all users in a specific role:
> InUserRole( 'roleName' ) or InUserRole( x - roleId)
> userRole( userfield) - returns the role (as string) of a user
> Could look like:
> select name, userRole($reviewer) as role where $reviewer = InUserRole( roleId or name)
> This "field type" has the potential to replace a lot of document propeties too:
> ownerId, ownerLogin could just be "owner"
> lastModifierId, lastModifierLogin could be "lastModifier"
> variantLastModifierId, variantLastModifierLogin could be "variantLastModifier"
> In fact, the rest of the properties could be "derived' from the user field directly if functions are designed to convert the user field to the various info:
> i.e.
> select userName( owner ) as ownerName where true
> select userLogin( lastModifier) as lastModifier where true
> select userId( variantLastModifier) as variantLastModifierId where true
> (Examples above shown with what column renaming could look like... but that's a feature request for another day)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the daisy
mailing list