Bulk upload plugin requested - bounty offered

Plugin Requests
  • Hi there

    Bounty offered to write this plugin

    I am working with an organisation to demonstrate how a forum can be used to create a community of practice using a form system. Their requirement was to identify a cloud based system that they can configure and use rather than have to undertake a systems integration project, the idea being that once they can demonstrate the effectiveness of such a community (or otherwise) the project can be extended to include deeper integration with their CRM.

    I have the document below as a word doc and would be happy to have a skupe with anyone interested, I am looking to go down the test driven development route 🙂

    In reviewing the various systems currently available to deliver this functionality NodeBB met (and exceeded) the key requirement except one : Bulk loading of members and association with groups.

    The team wish to look to commission a plugin which would build upon the existing Write-API plugin to provide the functionality described in the use cases in the list below.

    If you are interested then send me an email, [email protected] I have the spec below as a word / google doc if that helps and no dobut the spec needs a bit of refinement.

    Functional requirement

    To take as an input a csv / json file in a flat structure described in appendix 1 below. The flat file structure is designed to be easy for users to create from excel or similar with the potential to have multiple lines for each user rather than having a more nested structure. Increasingly it possible to convert CSV to json using tools such as http://www.convertcsv.com/csv-to-json.htm which are much more readable especially if there are no nested groups. The de-normalised file structure can have multiple lines for any given user, this is intentional and is intended to make it easy for uses to create add / delete lists using common tools such as excel. The design goal is to push the ETL complexity into the module were it could be handled against a set of simple business rules. This will drive adoption will reduce the number of add/ delete errors.

    Requirement

    Serial Use Case Notes

    1 Add user

    Processing

    If there is no such user then providing the input data validates and is complete generate a 6 character password use write API and create a record email user via Node

    Exception

    If the user exists, ignore and go onto processing the group parameter if it exists or move to next record Takes more than 30 seconds to process a line – timeout error

    Log entries

    Write out a log status for each transaction

    <timestamp>Info: User < username> added to system
    <timestamp>Error: User <username> not added -insufficient data
    <timestamp>Error: User <username> not added -non valid email
    <timestamp>Error: User <username> not added timeout

    2 Add Group to user

    Processing

    If the user does not exist then run use case add user above If the group exists and the user is not already in the group then add user to group

    Exception

    If the user is already in the group ignore write an error
    If the group does not exist ignore write an error
    Takes more than 30 seconds to process a line – timeout error

    Log entries

    Write out a log status for each transaction

    <timestamp>Info: user <username> added to group <group>
    <timestamp>Error: user <username> already in group <group>
    <timestamp>Error: group <group> does not exist could not add user <username>
    <timestamp>Error: group <group> user <username> - not added timeout

    3 Remove Group access from user

    Processing

    If the group does not exist the raise an error
    If the user is not in the group then raise an error Remove the user <username> from the group

    Exception

    If the user is not in the group ignore write an error
    If the user is logged in then ignore and write an error
    If the group does not exist ignore write an error
    Takes more than 30 seconds to process a line – timeout error

    Log entries

    Write out a log status for each transaction

    <timestamp>Info: user <username> removed from group <group>
    <timestamp>Error: user <username> not in group <group> cannot remove
    <timestamp>Error: group <group> does not exist could not remove user <username>
    <timestamp>Error: cannot remove user <username> from group– timeout error

    4 Suspend a user accounts and access

    Processing

    Suspend user <username> from accessing the system and all groups that require a login.

    Exceptions

    There is no such user - raise an error

    Log entries

    Write out a log status for each transaction

    <timestamp>Info: user <username> suspended form all groups and system access
    <timestamp>Error: There is no such user <username>

    5 Processing record

    This is a nice to have

    Processing and MIS

    Write to log file a Timestamp the start of processing

    Keep a tally of

    1. Number of users added
    2. Number of group adds
    3. Number of group removes
    4. Number of suspends
    5. Total number of info records
    6. Total number of error records

    Timestamp when processing ends

    Pull out a list of groups and total number of users and total number of users / group If processing any one record takes more than 30 seconds then time out and pass to the next.

    In addition to being able to handle the use cases above the plugin would also need to provide some sort of UI to provide:

    • The ability to validate an data processing using a password or key
    • The ability to load a data file
    • The ability to download a processing log

    Appendix 1

    The file will be in CSV format (pipe separated) and to have the following structure

    Field name M/O Validation rule
    USERNAME, M, can it process unicode
    EMAIL , M, needs to be avalid format
    GROUP, O, Needs to be valid group name on that board
    ACTION, O, A, R, GR - (add, remove, group remove)

    Example Data file and format

    CSV file ( pipe delimited) Goal / test case

    username|email|group|action
    dmoore|[email protected]|QTLS|A
    dmoore|[email protected]|SET|A
    edna2|edna2@[email protected]|QTLS|
    edna2|edna2@[email protected]||R
    edna3|edna3@[email protected]||

    and in JSON

    [
      {
        "username":"dmoore",
        "email":"[email protected]",
        "group":"QTLS",
        "action":"A"
      },
      {
    
        "username":"dmoore",
        "email":"[email protected]",
        "group":"SET",
        "action":"A"
      },
      {
        "username":"edna2",
        "email":"edna2@[email protected]",
        "group":"QTLS",
        "action":" "
      },
      {
        "username":"edna2", 
        "email":"edna2@[email protected]",
        "group":"",
        "action":"remove"
      },
      {
        "username":"edna3",
        "email":"edna3@etft[email protected]",
        "group":"",
        "action":""
      }
    ]
    
  • With the specificity and documentation available there, you would have no difficulty finding a freelancer to complete this project. There are a great many javascript programmers that can easily pick up NodeBB; the documentation is very good.

    Odesk.com (now upwork.com)
    elance.com

    But remember, open sourcing your code is the right thing to do! 🙂

  • Hi Jonny

    Yup agree with the opensource thing I am happy to make any development open. what licence does Nodebb prefer?

    I will contact the links you have pointed at and ask them to quote - its a charity so not exactly rolling in $$$$ but need it done.

    Thanks
    D
    D

  • When using odesk:

    homepage --> Search --> "javascript" --> more options button --> "find a different test" = javascript
    Javascript button dropdown menu --> scored in the top 30% dropdown --> scored in the top 10% option

    Sorry to helpdesk you there, but I do work a L3 helpdesk. It is very important to separate the wheat from the chaff when hiring a freelancer online. Soviet Bloc countries have some of the best hackers in the world: India has an amazingly well educated population. Though with freelancers, the country in which they reside is far less important than the skill and experience of the individual. First-world, Third-world, BRIC countries...

    MIT is the best license; it allows your code the longest lifespan and usability.

    Good luck with your project. 🙂

  • Jonny
    Don't ever apologies for providing advice, that after all is why we are all here 👍 and the great thing about advice is that the user can choose what to do with it. In this case I shall be applying it to the letter.

    D


Suggested Topics


  • Group formating plugin

    Plugin Requests
    0 Votes
    1 Posts
    201 Views

    I am looking for a plugin to make the color you set for a group the color for the name of someone in it,

    For example

    alt text

    The color for the group administrators is Blue but my name is white , i am searching for a plugin that can make the color of the group the same color of the user name

  • Schedule Posts request

    Plugin Requests
    0 Votes
    1 Posts
    1k Views

    Hi all,

    I'm not sure if this is a feature request or a plugin request. Either way, I need a way for posts to go live when I'm not at my computer, so a method for scheduling posts to go live at a certain time would be most welcomed.

    Please let me know if this isn't in the right place or if there's anything extra I need to do. This is my first time posting on these forums. Many thanks!

  • 0 Votes
    7 Posts
    3k Views

    To anyone searching the same thing, I resolved the problem using the custom write-api hooks, I wasn't aware of:

    https://github.com/NodeBB/nodebb-plugin-write-api/blob/master/routes/v1/index.js#L45

    filter:plugin.write-api.routes

    that gives you data, I used it in this way:

    function(data, callback) { var app = data.router; var apiMiddleware = data.apiMiddleware; var middleware = data.middleware; var errorHandler = data.errorHandler; app.post('/route', apiMiddleware.requireUser, function(req, res) { // do stuff }); callback(null, { router: app }); };

    Obviously you should have nodebb-plugin-write-api installed.

  • 0 Votes
    3 Posts
    2k Views

    Bad gateway might occur due to an incorrect setting in your Proxy.

    It is recommended by me to use Nginx as it is easy to setup and apparently automatically recovers after a bad gateway.

    What Operating System Are you using?

  • 1 Votes
    1 Posts
    1k Views

    I just tested to create a new group and following two issues occured

    bug: using svg-images for header works fine until "save" gets pressed. save responds with "error". feature-request: I'd like to set the background-size to contain and center the position.