Project

General

Profile

task #7269

Use redmine as message hub for submitter curator communication

Added by Andreas Kohlbecker 10 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
New
Category:
cdm-vaadin
Target version:
Start date:
02/20/2018
Due date:
% Done:

50%

Severity:
normal
Tags:

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
  • 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!

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:

Users

  • 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" 
    }
}

Issues, Issue Journals

  • 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

Ids in redmine.phycobank.org

  • Project id = phycobank-registry
  • Tracker registration = 1
  • Custom field ids:
    • Identifier = 1
    • Submitter = 2
    • Curator = 3
    • Unread = 4 will 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

picture68-1.png View (45.5 KB) Andreas Kohlbecker, 02/19/2018 10:18 PM


Subtasks


Related issues

Related to Edit - feature request #7270: Registration message controller implemented New 02/15/2018
Related to Edit - task #7315: remove workaround RedmineTransportAccessor New 03/15/2018
Copied from AlgenRegistrierung - feature request #6868: Manage annotations and all Submitter-Curator communication in Ticktsystem (redmine) Duplicate 08/01/2017

Associated revisions

Revision 83d34a19 (diff)
Added by Andreas Kohlbecker 10 months ago

fix #7269 implementing RedmineRegistrationMessageService

Revision f79378cc (diff)
Added by Andreas Kohlbecker 10 months ago

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

Revision 19c333f8 (diff)
Added by Andreas Kohlbecker 10 months ago

ref #7269 pulling public service methods into service interface

Revision 70cb2907 (diff)
Added by Andreas Kohlbecker 10 months ago

ref #7269 making redmine issues private

Revision 7a3e5df4 (diff)
Added by Andreas Kohlbecker 10 months ago

ref #7269 redmine issues made private and public methods in interface

Revision 3ab39923 (diff)
Added by Andreas Kohlbecker 10 months ago

ref #7269 improving performance by factor 1.3

Revision 1c2f909e (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 basic implementation of the registration messaging UI

Revision 14fd703d (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 layout improvements in messages popup window

Revision 538322d1 (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 setting curator when posting messages (not yet working)

Revision aebcfdfe (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 ExternalServiceException more detailed information

Revision a1ac8acd (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 fixing bug regarding Curator field and extending test

Revision 1affb934 (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 improving layout of RegistrationMessagesPopup and harmonization of styles

Revision 2085c699 (diff)
Added by Andreas Kohlbecker 9 months ago

ref #7269 manaing enabled state of messages button and adding description text

Revision 2ccbcf35 (diff)
Added by Patrick Plitzner 8 months ago

fix #7269 Add missing redmine dependency to taxeditor.cdmlib

History

#1 Updated by Andreas Kohlbecker 10 months 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 10 months ago

  • Target version deleted (Unassigned CDM tickets)

#3 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#4 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#5 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#6 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#7 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#8 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#9 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#10 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#11 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#12 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#13 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#14 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#15 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#16 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#17 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#18 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#19 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#20 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 10

#21 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#22 Updated by Andreas Kohlbecker 10 months ago

#23 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)
  • % Done changed from 10 to 30

#24 Updated by Andreas Kohlbecker 10 months ago

  • File picture626-1.png added
  • Description updated (diff)

#25 Updated by Andreas Kohlbecker 10 months ago

#26 Updated by Andreas Kohlbecker 10 months ago

  • File deleted (picture626-1.png)

#27 Updated by Andreas Kohlbecker 10 months ago

  • Description updated (diff)

#28 Updated by Andreas Kohlbecker 10 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 100 to 50

#29 Updated by Andreas Kohlbecker 10 months 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 10 months ago

  • Description updated (diff)
  • Status changed from Resolved to In Progress

#32 Updated by Andreas Kohlbecker 9 months ago

  • Related to task #7315: remove workaround RedmineTransportAccessor added

#33 Updated by Andreas Kohlbecker 9 months ago

  • Status changed from In Progress to Resolved

#34 Updated by Patrick Plitzner 8 months ago

  • % Done changed from 100 to 50

#35 Updated by Andreas Kohlbecker 8 months ago

  • Target version set to Release 5.0

#36 Updated by Andreas Kohlbecker 5 months ago

  • Copied from feature request #6868: Manage annotations and all Submitter-Curator communication in Ticktsystem (redmine) added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)