Problem/Motivation

Now in the job message is not clear that the abortion is done by the user, so we should change the actual message:
The translation job has been aborted.
To:
The translation job has been aborted by the user.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

edurenye created an issue. See original summary.

edurenye’s picture

Title: The abort message shout say that is aborted by the user » The abort message should say that is aborted by the user
edurenye’s picture

Status: Active » Needs review
StatusFileSize
new591 bytes

Done.

berdir’s picture

Almost committed this but I actually, this is not strictly true. This is an API. Anyone can call it. You could implement a translator that allows to abort jobs on their side and report that back. You could write a module that aborts jobs that have been unfinished for too long.

miro_dietiker’s picture

Yeah i agree, there are other situations where triggering an abort might make sense.

The problem is, the caller can not really just pass in the message forward with the current API.
So are you saying we can't fix this at all?

berdir’s picture

Status: Needs review » Needs work

Yeah, we'd have to pass the message through two messages and all plugins that implement it would have to respect that.

As a not so nice API but easy addition: $job->setDefaultAbortMessage($message, $variables); $job->abortTranslation(). And then aborted() would use that default message if one was set?

miro_dietiker’s picture

Hm that alread hurts when reading. ;-)
I fear if we work on improving messages, we would end up with multiple similar workarounds?

Thought it's a quickfix... Another one. ;-)

I think it's not that important to add a workaround!
Since an abort is final, i could even live with two messages instead:
- The user ordered aborting the Job through the UI.
- The translation job has been aborted.

However, with translator interaction, there is need to have great messages: less garbage and valuable information added instead.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new4.58 KB
new5.02 KB

Ok, now if is added using the form it will say:
"The translation job has been aborted by the user."
Otherwise will say:
"The translation job has been aborted."

miro_dietiker’s picture

Status: Needs review » Needs work

Not sure about that direction.
Please read my message #7 and check back with Berdir or me next week.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new1.7 KB

Reverted all changes, now I just add the message as debug, the user that aborted already now that he did it through the UI, this should be seen just for other users.

I realized that the order of the messages between Job::getMessagesSince() is reversed, should I open a issue for that?

miro_dietiker’s picture

Status: Needs review » Needs work

The debug severity is too low. That's not a technical debug information. It's user awareness. ;-)
I think the default "status" would be fine because it's a status change.
I also thought about different keys such as "ui" or "info" or "action" but i think we don't have a managed set of those keys and are not using them really yet so we first need a strategy on how we deal with them...

You also change the redirect URL handling.
Does this mean it was broken before? We will need test coverage for that fix.
Also the aborting message should be checked in one location. ;-)

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new666 bytes
new2.38 KB
new1.19 KB

Added test for the message.

About the other change, is just a deprecated method replace, works the same way was working before. However it had no test, so I added test for it also.

The last submitted patch, 12: the_abort_message-2674688-12-test_only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 12: the_abort_message-2674688-12.patch, failed testing.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new2.38 KB

Rebased.

miro_dietiker’s picture

Status: Needs review » Fixed

This looks good to me. Committed.

  • miro_dietiker committed c854ec3 on 8.x-1.x authored by edurenye
    Issue #2674688 by edurenye: The abort message should say that is aborted...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.