Atlassian JIRA   History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: XRP-106
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Applied
Priority: Minor Minor
Assignee: Marc Portier
Reporter: Marc Portier
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
xReporter

Allow SavedQueries to be accessible by not only the creator.

Created: 22/Feb/06 07:49 AM   Updated: 17/Feb/07 01:24 PM
Component/s: xReporter, xReporter-Cocoon
Affects Version/s: None
Fix Version/s: 1.3

File Attachments: None
Image Attachments:

1. personal-list.png
(45 kb)

2. public-list.png
(43 kb)

3. reportstore-db.png
(40 kb)

4. save-report.png
(31 kb)


 Description   
We've got some xreporter-endusers (meaning: people that use the system to browse data, filter, sort... not report-definition-writers) that have some 'saved' reports they 'ld like to share easily with others.

To enable this feature the idea is to have an additional checkbox "[ ] allow others to use this report" on the 'save report' form.
Upon creation this would store that flag in a to be added column on the 'reportstore' table of the xreporteradmin database.
(defaulting to false for backwards compat)

Further, people should be able to get a list of publically available reports, (Reports thight to report-definitions or datasources this user doesn't have access to should be removed from the list) pick one from the list and be able to execute it. Only original creators of reports should be able to delete them.

This does not only have an impact on the xreporter-admin schema, it also affects the HTTP Interface.
See http://cocoondev.org/xreporter/docs/core/remoting.html

Currently we have the resource '/savedreports' which allows to
- GET: producing a list of reports for this user
  <?xml version="1.0" encoding="UTF-8"?>
  <xr:saved-reports xmlns:xr="http://outerx.org/xreporter/result/1.0">
    <xr:info>
      <xr:user>
        <xr:name>jef</xr:name>
        <xr:customer>jefenzonen</xr:customer>
        <xr:property name="massa" value="95"/>
      </xr:user>
      <xr:time>Feb 22, 2006 1:56:35 PM</xr:time>
    </xr:info>

    <xr:saved-report name="test_score" datasource-id="ds1" report-definition-id="presidentscore"/>
    <xr:saved-report name="test_sheet_eisenhouwer" datasource-id="ds1" report-definition-id="president_sheet"/>
  </xr:saved-reports>

>> In this list we could be adding @id and @owner (see further) attributes to the saved-report elements

- POST with params action="new", report-instance-id=(instance to save), name=(name for the report), overwrite=true
   to actually create the saved report on the server

>> here we could add a public="true | false" parameter

And there is the sub-resource '/savedreports/{name}' which doesn't support GET but allows to

- POST with param action="createinstance | delete" to instantiate or remove the saved report

>> Note however that this {name} is only to be interpreted correctly in the context of the 'user'

To be able to support the described new feature we however need to be able to point to the actual 'id' of the report to instantiate it, we also need some resource to produce the list of all public reports.

A possible approach would be to introduce a new resource '/publicsavedreports' with sub-resources 'publicsavedreports/{id}' to accomodate for this. The former would support only GET to produce the list of public reports, and the latter would only support POST with action='createinstance'

XMLLayout of this list would be equal to the extended list we already have, XSLT should then be able to only produce delete-action links for those saved-reports 'owned' by the user executing.
 




 All   Comments   Change History      Sort Order:
Comment by Marc Portier [22/Feb/06 09:32 AM]
More thoughts:

add savedReports/@isPublic attribute as well (seems like interesting metadata the stylesheet could do stuff with)

Comment by Marc Portier [01/Mar/06 07:52 AM]
new view of the 'saved-reports' : only personal reports, added icon to toggle visibility, link to public reports

Comment by Marc Portier [01/Mar/06 07:53 AM]
view of the public-list: shouldn't allow actions if not owner!

Comment by Marc Portier [01/Mar/06 07:54 AM]
shows additional field to save report for the public

Comment by Marc Portier [01/Mar/06 07:54 AM]
additional required column in reportstore table

Comment by Marc Portier [01/Mar/06 08:05 AM]
Updated required dbschema: http://svn.cocoondev.org/viewsvn?rev=663&root=xreporter&view=rev
Implemented proposed feature: http://svn.cocoondev.org/viewsvn?rev=664&root=xreporter&view=rev

compared to the original description of the issue, there are these small changes:
- when saving the report the added parameter-name is 'is-public' it's value should be 'true' or anything else (inlcluding not present) to indicate 'false'
- the xml-result-list has also an attribute @list-type="personal | public" so the stylesheet can react on that
- two additional actions POSTed to /savedreports/{name} allow to 'makepublic' and 'makeprivate' the already existing report

as described action has been taken to remove those reports from the list (private or public) that the current user cannot execute anyway (missing rights to datasource or report-definition) --> this is different to what was the case before for the private list (where you could have a lingering saved report that wasn't executable to you any more)

important notifications regarding updating ready installations:
- db schema needs to be updated, see: http://svn.cocoondev.org/viewsvn/trunk/xreporter/src/resources/schema/dbschema/xreporteradmin_upd_1.2.1_1.2.2.mysql?rev=663&root=xreporter&view=markup
- additional i18n messages have been introduced. See: http://svn.cocoondev.org/viewsvn/trunk/xreporter-cocoon/src/resources/common/messages_en.xml?rev=664&root=xreporter&view=diff&r1=664&r2=663&p1=trunk/xreporter-cocoon/src/resources/common/messages_en.xml&p2=/trunk/xreporter-cocoon/src/resources/common/messages_en.xml
- new xsl-templates have been introduced that you typically want to override in your skin:
http://svn.cocoondev.org/viewsvn/trunk/xreporter-cocoon/src/resources/skins/outerthought/stylesheets/html/savedreports.xsl?rev=664&root=xreporter&view=diff&r1=664&r2=663&p1=trunk/xreporter-cocoon/src/resources/skins/outerthought/stylesheets/html/savedreports.xsl&p2=/trunk/xreporter-cocoon/src/resources/skins/outerthought/stylesheets/html/savedreports.xsl