Bug #1887
Adding CCA Module to any other than the newest version of a technology should not be possibl
0%
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
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.
- 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.
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.
Updated by Brahadeesh Dheenadayalan_Sivakami about 5 years ago
- Assignee set to Brahadeesh Dheenadayalan_Sivakami
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.
- Is this check only when adding to a public version? If the user is adding to a draft version is it fine?
- 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
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)..
Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago
- File CCA_Unpublished_ErrorScreenshot.png CCA_Unpublished_ErrorScreenshot.png added
- Status changed from In Progress to Feedback
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
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.
Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago
- File CCA_Unpublished_NewError_Nobr.png CCA_Unpublished_NewError_Nobr.png added
- File CCA_Unpublished_NewError_Withbr.png CCA_Unpublished_NewError_Withbr.png added
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
Updated by Brahadeesh Dheenadayalan_Sivakami almost 5 years ago
- Assignee changed from Brahadeesh Dheenadayalan_Sivakami to Kurt Gerber