CDR Tickets

Issue Number 3227
Summary Create user group for Replace CWD with older version tool
Created 2010-09-20 11:52:17
Issue Type Improvement
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To alan
Status Closed
Resolved 2010-10-11 13:34:25
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.107555
Description

BZISSUE::4915
BZDATETIME::2010-09-20 11:52:17
BZCREATOR::William Osei-Poku
BZASSIGNEE::Alan Meyer
BZQACONTACT::William Osei-Poku

Please create a user group for authorizing users for the Replace CWD with older version tool. Also, create a log system to track who uses the tool, for what document it is used for and how often it is used.

Comment entered 2010-09-23 18:39:22 by alan

BZDATETIME::2010-09-23 18:39:22
BZCOMMENTOR::Alan Meyer
BZCOMMENT::1

I propose to log the following information whenever a user
replaces a CWD with an older version

  • Date/time

  • User id

  • Doc ID

  • Version info before change (last ver num, last pub, is CWD
    different?)

  • Version number promoted to new CWD

  • Whether a new version was created

  • Whether the new version is publishable

  • Reason, i.e., the comment entered by the user as to why he or
    she did this.

I'll put all this in the log directory.

Since our log directory is not directly readable by users, I'll
write a report program that anyone can use to read it.

The report program will ask for optional inputs:

Start date:
If entered, I'll only show CWD promotions on or after
that date.

User id:
If entered, I'll only show promotions by that user.

Doc type:
If entered, I'll only show docs of that type.

Doc id:
If entered, I'll only show promotions of that specific
document.

If nothing is entered, everything in the log will be displayed.

The output will be an HTML table.

Is that useful? Or is it massive overkill?

Actually though, I think filtering at least by date will need to be
done. Adding the rest of the filters isn't that much extra work.

I'll proceed with this plan unless I hear otherwise.

Comment entered 2010-09-24 16:25:41 by Beckwith, Margaret (NIH/NCI) [E]

BZDATETIME::2010-09-24 16:25:41
BZCOMMENTOR::Margaret Beckwith
BZCOMMENT::2

I think this sounds fine Alan.

Comment entered 2010-09-30 21:46:26 by alan

BZDATETIME::2010-09-30 21:46:26
BZCOMMENTOR::Alan Meyer
BZCOMMENT::3

I think everything is done on this task and it's ready for user
testing on Mahler. Here is what has changed:

1. Actions.

We have a new "action" named "REPLACE CWD WITH VERSION". A
user must have the authority to perform that action in order
to do what it says.

2. Groups.

There is a new group: "Version CWD Promoters" (I know, it
sounds like a new biological therapy for colon cancer.)
Anyone placed in this group will have authority to perform
the above action.

Right now there are two members of the group, myself and
William.

3. Changes to the function to "Replace CWD with Older Version."

The program checks a user's authorization to perform the new
action. If the user has the authorization, he can use the
function. However the user must still have permission to
modify a document of the particular document type he is tries
to promote. A person who has no authority to edit a Summary
still cannot promote an old Summary version to become the new
CWD.

The program now also logs information about the action, as
described in a previous comment. I considered keeping the
log in the database, which has some advantages, but decided
to stick with our standard mechanism of writing to a log file
in the "\cdr\Log" directory. The log file contains one row
of tab separated plain text fields for each replacement that
takes place.

4. Reporting.

To view the log, a user does the following in the
administrative system:

Reports
Genreral Reports
Versions that Replaced CWDs

There is no access control to this. It's just a report.
Anyone can use it.

A user can submit a report with no parameters to see
everything in the log file, or can ask the report to select
just those entries after a certain date, involving a single
document, a single doc type, or a single user. It then
displays an HTML table of results.

If the log file gets damaged in any way, the report program
will try to ignore the damaged lines, try to continue to
report the good lines, and ask the user to inform the support
staff.

Currently, there are 5 entries in the log involving 2 documents
and 1 user (me). A good test might be for William to promote
some other document versions to become CWDs and then look at the
report to see all of them or some of them, filtered by various
criteria.

Comment entered 2010-10-05 14:38:57 by Osei-Poku, William (NIH/NCI) [C]

BZDATETIME::2010-10-05 14:38:57
BZCOMMENTOR::William Osei-Poku
BZCOMMENT::4

It looks like you need to add the tool back to the admin menu for non administrative users? Also, I am not sure how I should test the new Action you added. I checked the available Actions and it is not there. I also added my account and a few other accounts to the "Version CWD Promoters" group and yet when I click on the "Replace CWD with Older Version" link in the admin menu for Administrators/System Developers, I get a not authorized error message. I am not sure if I am doing something wrong.

Comment entered 2010-10-05 22:22:26 by alan

BZDATETIME::2010-10-05 22:22:26
BZCOMMENTOR::Alan Meyer
BZCOMMENT::5

(In reply to comment #4)
> It looks like you need to add the tool back to the admin menu
> for non administrative users?

Done.

> Also, I am not sure how I should test the new Action you added.
> I checked the available Actions and it is not there. I also
> added my account and a few other accounts to the "Version CWD
> Promoters" group and yet when I click on the "Replace CWD with
> Older Version" link in the admin menu for Administrators/System
> Developers, I get a not authorized error message. I am not sure
> if I am doing something wrong.

You didn't do anything wrong. I think that when Volker refreshed
the Mahler database from Bach the action got lost. I had put the
group in the Bach database but hadn't put in the action. So when
the database was copied, the action no longer existed. Nobody was
authorized to use the software.

I have now installed the action and the group on Bach as well as
Mahler. So this shouldn't happen again if there is another
refresh before we put the revised software into production. The
required values will also be ready on Bach as soon as we promote
the software.

Please try testing again.

Comment entered 2010-10-07 11:53:21 by Osei-Poku, William (NIH/NCI) [C]

BZDATETIME::2010-10-07 11:53:21
BZCOMMENTOR::William Osei-Poku
BZCOMMENT::6

Verified on Mahler. Please promote to Bach.

Comment entered 2010-10-07 22:23:09 by alan

BZDATETIME::2010-10-07 22:23:09
BZCOMMENTOR::Alan Meyer
BZCOMMENT::7

(In reply to comment #6)
> Verified on Mahler. Please promote to Bach.

Done.

I've promoted all of the software to Bach. In order to test I did the
following:

Picked a document that is currently inactive/blocked, and for
which the last version is identical to the current working
document. CDR0000001042 was selected.

Replaced the CWD with the last version - which should result
in no actual change in the XML.

Ran the report to see if the replacement shows up.

Checked the Document Activity report for confirmation.

My goal was to run a test that would have minimum (close to zero
in this case) impact on the production database.

Everything appeared to work.

Comment entered 2010-10-07 22:23:31 by alan

BZDATETIME::2010-10-07 22:23:31
BZCOMMENTOR::Alan Meyer
BZCOMMENT::8

Marking this resolved-fixed.

Comment entered 2010-10-11 13:34:25 by Osei-Poku, William (NIH/NCI) [C]

BZDATETIME::2010-10-11 13:34:25
BZCOMMENTOR::William Osei-Poku
BZCOMMENT::9

Verified on Bach. Issues closed. Thanks!

Elapsed: 0:00:00.001438