Project

General

Profile

Bug #1887

Adding CCA Module to any other than the newest version of a technology should not be possibl

Added by Kurt Gerber about 5 years ago. Updated almost 5 years ago.

Status:
In Progress
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
17 Sep 2019
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Problem:
At the moment, one can attach a CCA Module (questionnaire) to a technology even, when it is not the newest version.

Example: A technology has two versions: An public first version and a second, draft version.
One can now add a CCA module to the public version (first version) instead of the draft version.
When the CCA module is published, everything looks good.
But when the draft version of the technology is published, the CCA module will disappear and only be visible, when one opens the old, inactive version of the technology.

Further inquirey: A user adds a CCA module to a technology. The user was not involved as compiler, editor or reviewer in the creation of this technology.
Is he able to see the draft?


Files

CCA_Unpublished_ErrorScreenshot.png (154 KB) CCA_Unpublished_ErrorScreenshot.png Brahadeesh Dheenadayalan_Sivakami, 12 Dec 2019 23:38
pop-up.png (60.4 KB) pop-up.png Kurt Gerber, 13 Dec 2019 14:33
CCA_Unpublished_NewError_Nobr.png (25 KB) CCA_Unpublished_NewError_Nobr.png Brahadeesh Dheenadayalan_Sivakami, 13 Dec 2019 23:53
CCA_Unpublished_NewError_Withbr.png (28.6 KB) CCA_Unpublished_NewError_Withbr.png Brahadeesh Dheenadayalan_Sivakami, 13 Dec 2019 23:53
#1

Updated by Kurt Gerber about 5 years ago

Did further tests to answer the last question.
The answer is:
No the user can not see the draft version and the application doesn't do any check if there is any newer version. So the Module is added to the last active version.

Possible solutions:
  • In the background, the application checks if the version to which it the module is added, is the newest one, if not, the module is additionally added to the newest version.
#2

Updated by Kurt Gerber about 5 years ago

  • Assignee deleted (Kurt Gerber)

Preferred solution, after discussion with Lukas:

Solution:

If a user tries to add a CCA module to a public version of a technology:

1. The application has to test, if a newer, nunpublished version exists.
2. If yes: disalllow the addition of a module with a message saying:

A newer, unpublished version of this technology exists. It has to be published first, before you can add a CCA module. Please contact the compiler or the WOCAT secretariat for further information.

#3

Updated by Brahadeesh Dheenadayalan_Sivakami about 5 years ago

  • Assignee set to Brahadeesh Dheenadayalan_Sivakami
#4

Updated by Kurt Gerber almost 5 years ago

  • Status changed from Accepted to In Progress
#5

Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago

  • Assignee changed from Brahadeesh Dheenadayalan_Sivakami to Kurt Gerber

I have added the code to check if the questionnaire code has a newer version as 'draft' and return the notification to the user.
I have also submitted a pull request.

There are a couple questions though.
  1. Is this check only when adding to a public version? If the user is adding to a draft version is it fine?
  2. Does unpublished also include submitted, reviewed, rejected apart from draft?

I can update the pull request to check the other statuses referenced in 2.

Thanks,
Guhan

#6

Updated by Kurt Gerber almost 5 years ago

I think my definition was a bit incomplete:

Cases, in which a CCA can be added:

1. To a published technology version for which no newer non-published version exists.
2. To a draft version of a technology (draft version ONLY)

Cases in which the addition of a CCA should be blocked:

1. To a published technology version when a newer non-published version of any kind exisits (draft, submitted, reviewed, rejected)..

#7

Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago

Thank you for the clarity Kurt!
I have updated the pull request with filtering for the other statuses.

Also, can the display duration for the notification popup be extended?
Currently, it is set to 5 seconds and I could not finish reading the error message before it disappeared.
This would be a simple update to the css for the notifications. If so, what should the new duration be?

Thanks,
Guhan

#8

Updated by Kurt Gerber almost 5 years ago

  • File pop-up.png pop-up.png added
  • Status changed from Feedback to In Progress
  • Assignee changed from Kurt Gerber to Brahadeesh Dheenadayalan_Sivakami

No duration at all! I would prefer the kind of pop-up, which adds a kind of layer (see attached image for the pop-up used, when opening qcat.wocat.net/en/wocat/technologies/edit/new/)

Conditions:

  • The pop-up appears, when he selects a technology, for which the user can't add a CCA, Or when he clicks on 'Create' button below '3. Create CCA Module'
  • User has no other possibility, than clicking on 'Close'
  • When clicking on 'Close' the user remains on the page, where he was searching the technology to add a CCA module. The CCA edit window won't open.

    We should stay consistent and use the same type of pop-up as at other places.

#9

Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago

Kurt,
The HttpResponseRedirect error messages coming back from a POST are being handled using a base template for the entire app.
This template checks for any error messages and renders them on the redirected URL when page is loaded <the popup with a 5s display duration>.

I have added the popup design you indicated to the html and it displays as attached <with and without line breaks>.
Please review and let me know which works best for you.
Also, the pull request has been updated to the version with line breaks.

Thanks,
Guhan

#10

Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago

  • Assignee changed from Brahadeesh Dheenadayalan_Sivakami to Kurt Gerber

Also available in: Atom PDF