[Aristotle App] Automatic Fetching of Contributions, Weekly Reports part 2 and more

in #utopian-io6 years ago (edited)

Repository

https://github.com/dimitrisp2/AristotleApp

About Aristotle App

Aristotle App will help the translation teams of @utopian-io have a more uniformed and centralised method to keep track of their progress and tasks. Most of the teams are using spreadsheets to manage their work, but if such spreadsheets are not properly managed, they can become a burden instead of a help (I know as I'm part of the Greek Translations Team).

It was originally created to help the Greek Team's activities in the Translation category, as well as managing the community account @aristotle.team.


Overview

The past few days saw a great amount of development happening in more than 18 commits and I can't be more happy with the progress of the App. I implemented automatic fetching contributions from utopian.rocks (thanks to @amosbastian for providing an API), finished the weekly reports basic functionality and fixed a couple of bugs.

I haven't listed all the commits inside the post. A full list of commits, together with their messages, can be found here!


Automatic Contribution Fetching

Using @amosbastian's API functionality from utopian.rocks, the app can now fetch the translations contributions in a more automated manner. However, this will only work if the titles have a specific format, but the Greek team is already using this type of formatting.

The logic of the contribution updater code goes like this:

  1. The updater fetches the contribution list json and converts it to a multi-dimensional PHP array
  2. Then, it starts parsing through each contribution/array entry and checks if the contribution is already in the DB.
  3. If it is in the DB, it checks if the row is locked (a row is getting locked when the psot pays out).
  4. If it is locked, then it skips it. If it isn't locked, it checks various criteria (if it has been reviewed or upvoted and it isn't marked in the DB) and triggers an update.
  5. If it is not in the DB, it starts adding the basic information (Project/Wordcount/Part number etc). Extra details (such as, review and upvote) will be added in the next run.

The result is having all the details in the Contributions area (which needs some love by the way, I will get on it soon)

The API took me a good amount of time to correctly analyse and get the information I need. The next step on this feature is to check if the review has been voted by @utopian-io

Some of the related commits: [1036cff], [230a939], [9ce9cff], [4493045], [208d060], [0d8ac2e], [25f6b83], [2508bb8], [2c70e9c]


Basic functionality of Weekly Reports

As proofreaders/reviewers, we have to fill a weekly report on how the team has done in the past days. The basic part is to gather all contributions of that week, add an "overall" comment and have it ready for when the CMs asks us to pass the report to them. While it is not 100% finished, the gathering and overall comment part is ready.

When the date is filled the App will fetch the corresponding contributions using jQuery, as in the screenshot above. The table is not finished yet, as I haven't decided what information I'll show exactly, but I'm working on it. If the date is not a Saturday (as we are going on a Sunday -> Saturday week for translations), a message saying "The chosen date is not Saturday." will be displayed instead of a list, and the "Submit" button will get disabled. When a valid date is entered again, the "Submit" button will be re-enabled.

When submitted, the weekly report will be available under the "W.Reports" link in the menu bar. Here's a preview of what a weekly report looks like:

Related commit: [75a591b], [a10389d]


MySQL structure updated

Since the automatic contribution fetching is now working, the app has access to more information. 3 fields have been added on the contributions table, namely review-status, review-link and rowlock. I have also noticed a few mistakes in the types of the other fields of the table and I've fixed them. For example, postpayout was marked as timestamp for some reason, instead of decimal.

Related commit: [99bb9ab]


Bug fix: Contributions from all Proofreaders are shown on Weekly Reports

The intend was to show only a proofreader's checked contributions on their weekly reports, however I failed to include the needed code in the GetContributionList() function. The needed code, that is now added, is the following:

    if (!is_null($proofreader)) {
        if ($showand == TRUE) {
            $sqlaction .= "AND ";
        }
        $showand = TRUE;
        $sqlaction = $sqlaction . "`c`.`proofreader` = " . $proofreader . " ";
    }

Basically, the function accepts a multitude of arguments/variables as input. One of them is $proofreader, and there wasn't a check if it was set.

Related commit: [833f0f0]


Previous updates/reports:

  1. An app to supplement the Utopian Translation Teamwork [2018-10-15]
  2. Dynamic NavBar, Contributions List, Project View page, and more... [2018-10-22]
  3. Add Contribution, Weekly LM Reports and more... [2018-10-29]
  4. Access Control List, Magic Numbers and various fixes [2018-11-05]

Want to help?

If you want to talk about this project, you can message me on Discord (my tag is dimitrisp#4810). You can also find me on Utopian's discord. Pull requests will be accepted if they fix issues and/or implement extra functionality.


GitHub Account

https://github.com/dimitrisp2

Sort:  

Thanks for the contribution, @dimitrisp! It's very cool to see how this application is progressing and I'm glad to see the Utopian.rocks API could be of help.

The next step on this feature is to check if the review has been voted by @utopian-io

There should be a "voted_on" property that you can use which indicates whether or not this is the case.

Also good to see you added constants! I really like reading your contributions as it's always very clear what you implemented, why and how. It's honestly a really good example for others in my opinion. Keep up the good work!


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

There should be a "voted_on" property that you can use which indicates whether or not this is the case.

Hmm, ok, I'll have a look tomorrow and make it happen then 🙂

Thank you for your review and your good words!

Thank you for your review, @amosbastian! Keep up the good work!

This post has received a 20.00% upvote from @jmiller05!

Source
Leaving comments asking for votes, follows, or other self promotional messages could be seen as spam.

More Information:

The Art of Commenting
Comment Classifications

@spaminator I will not leave comments asking for votes, follows , or other self promotional messages. Comments have been disabled until this issue is resolved.

This comment has received a "Don't spam" comment from @dimitrisp!

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Hi @dimitrisp!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @dimitrisp!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hi, @dimitrisp!

You just got a 4.38% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 58625.96
ETH 3101.66
USDT 1.00
SBD 2.41