Project

General

Profile

Actions

bug #7995

closed

Registration.registrationDate not set when status is set PUBLISHED

Added by Andreas Kohlbecker about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Highest
Category:
cdm-vaadin
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
critical
Found in Version:
Tags:

Description

The Registration.registrationDate should be set to now when the status is set to PUBLISHED.
When status changes from PUBLISHED to something else the registrationDate should be resetted to null.

Per definition the registrationDate this the timestamp for when the registration has been published, so it makes most sense to implement this rule into the setter Registration.status. There might be rare use cases in which the registrationDate needs to be different. In these cases setting the data explicitly is needed anyway.


Related issues

Related to EDIT - feature request #6655: Implement a RegistrationManager with state machineRejectedAndreas Kohlbecker

Actions
Actions #1

Updated by Andreas Kohlbecker about 4 years ago

Actions #2

Updated by Andreas Kohlbecker about 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #3

Updated by Andreas Müller about 4 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

This is dangerous behaviour. For phycobank it might be correct as we edit the data within the database. However, for handling external registrations it is not correct. For the later usecase the user/developer must know that setting the date should be done after setting the state which is hidden knowledge only available in Javadoc or so which is dangerous. Also when accidentally changing the state and change it back to PUBLISHED the date is changed without realizing by the user maybe.

So I strongly recommend to implement this on application side if it is a wanted feature for phycobank but remove it from cdmlib-model. We could add a method in service layer if you want to encapsulate it within one operation. This method should have an according name, e.g. setStatusAndDate

Actions #4

Updated by Andreas Kohlbecker about 4 years ago

So I strongly recommend to implement this on application side

So this means implementing it in cdm-vaadin and in the registration controller methods (cdmlib-remote) which allow state changes. Especially in the remote layer it is crucial for the digital workflow that the registrationDate is always set to now when status is set PUBLISHED.

Actions #5

Updated by Andreas Müller about 4 years ago

Andreas Kohlbecker wrote:

So I strongly recommend to implement this on application side

So this means implementing it in cdm-vaadin and in the registration controller methods (cdmlib-remote) which allow state changes. Especially in the remote layer it is crucial for the digital workflow that the registrationDate is always set to now when status is set PUBLISHED.

sounds reasonable

Actions #6

Updated by Andreas Kohlbecker about 4 years ago

  • Status changed from Feedback to Resolved

There is now a updateStatusAndDate(RegistrationStatus status) method in Registration which can be used if needed. The algorithm is centralized that way.

Actions #7

Updated by Andreas Kohlbecker about 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

works now also in the RegistrationPopupEditor

Actions #8

Updated by Andreas Müller almost 4 years ago

  • Category changed from cdmlib to cdm-vaadin
Actions

Also available in: Atom PDF