task #7269
Use redmine as message hub for submitter curator communication
50%
Description
The Redmine issue system will be used to establish asynchronous communication between curator and submitters, which are also referred to as contributors.
Setup¶
Backups of the initial Redmine setup are found in Y:/GRUPPEN/BDI/Algenregistrierung/Registrierungs-Redmine
Workflow¶
- All messages are stored in redmine.
- For each registration entity an issue is created in redmine, when ever a message needs to be passed to submitter or curator
- The
User
for the contributor is being created as long as it does not exist in redmine.- Email-Notification in user account settings:
- Curator:
mail_notification: all
- Submitter:
mail_notification: only_my_events
- Curator:
- Email-Notification in user account settings:
- The
- A comment to the issue will be created for each message, the user which is sending the message will become watcher of the issue.
- The user to which the message is dedicated to will be set as Assignee and the priority is set to active
- Once the Submitter has taken action in response of the message send by the curator, the issue should be returned to the curator by adding a comment, setting the curator as assignee.
- The status of the issue is synchronized with the
Registration.status
- Setting the status to ready, published, or rejected will set the issue priority to inactive
- Submitter and Contributor will become watchers of the issue so that both can receive email notifications when a new message is posted.
Message indicators in the registration UI:
The message indicator shows a new message when priority_id > 1
:
- Submitter:
Submitter_id == Assignee_id && priority_id > 1
- Curator: `Submitter_id != Assignee_id && priority_id > 1'
Redmine REST api¶
Redmine has a REST api for basic CRUD operations (https://www.redmine.org/projects/redmine/wiki/Rest_api).
- Authentication can be done using an API-key passed in as a "X-Redmine-API-Key" HTTP header (added in Redmine 1.1.0)
- The API key is provided per user and can be retrieved from the "My account" page:
./my/account
- All operations can be done by an admin user on behalf of an ordinary user by using the HTTP header (X-Redmine-Switch-User: jsmith). This only works when using the API with an administrator account!
- The API key is provided per user and can be retrieved from the "My account" page:
Redmine Java API library is a FREE third-party Java library that can be used to access the Redmine API. It is released under Apache 2 open-source license. (support until Redmine 2.6.0 using REST API), see https://www.redmine.org/projects/redmine/wiki/Rest_api_with_java
<dependency> <groupId>com.taskadapter</groupId> <artifactId>redmine-java-api</artifactId> <version>3.1.0</version> </dependency>
For our purpose the Issue and User services are relevant:
- Create a user:
POST /users.json
{
"user": {
"login": "jplang",
"firstname": "Jean-Philippe",
"lastname": "Lang",
"mail": "jp_lang@yahoo.fr",
"password": "secret",
"mail_notification": "only_my_events|all"
}
}
- Create an issue:
POST /issues.json
{
"issue": {
"project_id": 1,
"tracker_id": 1,
"subject": "Registration: ${Registration.identifier}",
"description": "",
"priority_id": 1,
"custom_fields":
[
{"value":${Registration.identifier},"id":1},
{"value":${Submitter_id},"id":2}
]
"assigned_to_id": {user_id},
"watcher_user_ids": [1,2,3] /* Array of user ids to add as watchers */
}
}
- Add comment:
PUT /issues/[id].json
{
"issue": {
"notes": "Fixed in Revision 128"
}
}
- Change custom field
Unread
:PUT /issues/[id].json
{
"issue":
{
"custom_fields":
[
{"value":"1","id":4} /* 1 for true or 0 for false */
]
}
}
- Find an issue by registrationId:
GET /issues.json?cf_1=${Registration.identifier}
- here cf_1 refers to the custom field with id=1, which is the
Identifier
field - Does the find also support journals or id a second request needed?
/issues/[id].json?include=journals
- here cf_1 refers to the custom field with id=1, which is the
Ids in redmine.phycobank.org¶
- Project id =
phycobank-registry
- Tracker registration = 1
- Custom field ids:
- Identifier = 1
- Submitter = 2
- Curator = 3
Unread = 4will be handled via the priority field
- Issue statuses:
- preparation = 1
- curation = 2
- ready = 3
- published = 4
- rejected = 5
- Issue priorities:
- inactive = 1
- active = 2
Configure Workflow like:¶
Implementation requirements:¶
Settings:
- adminUserApiKey
- redmineURL
- projectId
Test system for integration testing:¶
Configuration details of the redmine-registration-messages integration test system are documented in the subtask
Additional TODOs:¶
- extract interface for service
- issues must be private
- issues must only be visible to the submitter and curator = watchers
Subtasks
Related issues
Associated revisions
fix #7269 implementing RedmineRegistrationMessageService
ref #7269 comment
ref #7269 fixing test environment to allow running RedmineRegistrationMessageServiceTest in the surefire test suite:
- fixing cdmlib-ext test application context
- avoiding CdmRepository as autowired spring bean
ref #7269 pulling public service methods into service interface
ref #7269 making redmine issues private
ref #7269 redmine issues made private and public methods in interface
ref #7269 improving performance by factor 1.3
ref #7269 basic implementation of the registration messaging UI
ref #7269 layout improvements in messages popup window
ref #7269 setting curator when posting messages (not yet working)
ref #7269 ExternalServiceException more detailed information
ref #7269 fixing bug regarding Curator field and extending test
ref #7269 workaround for redmine bug https://www.redmine.org/issues/28383
ref #7269 improving layout of RegistrationMessagesPopup and harmonization of styles
ref #7269 manaing enabled state of messages button and adding description text
fix #7269 Add missing redmine dependency to taxeditor.cdmlib
History
#1 Updated by Andreas Kohlbecker almost 3 years ago
- Tags set to phycobank
- Category set to cdm-vaadin
- Assignee set to Andreas Kohlbecker
- Priority changed from New to Highest
#2 Updated by Andreas Kohlbecker almost 3 years ago
- Target version deleted (
Unassigned CDM tickets)
#3 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#4 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#5 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#6 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#7 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#8 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#9 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#10 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#11 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#12 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#13 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#14 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#15 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#16 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#17 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#18 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#19 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#20 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
- Status changed from New to In Progress
- % Done changed from 0 to 10
#21 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#22 Updated by Andreas Kohlbecker almost 3 years ago
- Related to feature request #7270: Registration message controller implemented added
#23 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
- % Done changed from 10 to 30
#24 Updated by Andreas Kohlbecker almost 3 years ago
- File picture626-1.png added
- Description updated (diff)
#25 Updated by Andreas Kohlbecker almost 3 years ago
- File picture68-1.png View added
- Description updated (diff)
#26 Updated by Andreas Kohlbecker almost 3 years ago
- File deleted (
picture626-1.png)
#27 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
#28 Updated by Andreas Kohlbecker almost 3 years ago
- Status changed from In Progress to Resolved
- % Done changed from 100 to 50
Applied in changeset cdmlib|83d34a190ce9e9decc40866dea9c2a7b5cdf9fe8.
#29 Updated by Andreas Kohlbecker almost 3 years ago
Additional TODOs:
- extract interface for service
- issues must be private
- issues must only be visible to the submitter and curator = watchers
#30 Updated by Andreas Kohlbecker almost 3 years ago
- Description updated (diff)
- Status changed from Resolved to In Progress
#32 Updated by Andreas Kohlbecker almost 3 years ago
- Related to task #7315: remove workaround RedmineTransportAccessor added
#33 Updated by Andreas Kohlbecker almost 3 years ago
- Status changed from In Progress to Resolved
#34 Updated by Patrick Plitzner almost 3 years ago
- % Done changed from 100 to 50
Applied in changeset taxeditor|2ccbcf35e9e8b9cdd92c8c289cfe7f715ca047c7.
#35 Updated by Andreas Kohlbecker over 2 years ago
- Target version set to Release 5.0
#36 Updated by Andreas Kohlbecker over 2 years ago
- Copied from feature request #6868: Manage annotations and all Submitter-Curator communication in Ticktsystem (redmine) added
#37 Updated by Andreas Kohlbecker almost 2 years ago
- Related to task #7935: Discuss new solution to establish the communication between submitter and curator added
#38 Updated by Andreas Kohlbecker almost 2 years ago
- Related to bug #7936: Consider complete removal of redmine communication hub code added
#39 Updated by Andreas Kohlbecker almost 2 years ago
- Related to bug #8069: RegistrationUI: remove all messaging related code and message indicators from all views added
#40 Updated by Andreas Kohlbecker over 1 year ago
- Status changed from Resolved to Rejected
#41 Updated by Andreas Kohlbecker over 1 year ago
- Status changed from Rejected to Closed
even if it has been completely implemented this feature has been rejected afterwards