Bug #1887
Adding CCA Module to any other than the newest version of a technology should not be possibl
Added by Kurt Gerber over 5 years ago.
Updated over 5 years ago.
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
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.
- 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.
- Assignee set to Brahadeesh Dheenadayalan_Sivakami
- Status changed from Accepted to In Progress
- 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.
- 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
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)..
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
- 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:
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
- Assignee changed from Brahadeesh Dheenadayalan_Sivakami to Kurt Gerber
Also available in: Atom
PDF