? ? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
28 Mar 2017

Summary of Changes

To validate the color value in the color field, the color rule should be used. The doc blocks got updated of the onCustomFieldsPrepareDom function is they have been outdated.

Potential BC break

Additionally the color rule was changed to have the same behavior as the other rules when an empty value is passed and the field is not required. IMO this is not a BC break but a bug fixed, @Bakual, @mbabker and @wilsonge what you guys think?

Testing Instructions

  • Create a color field
  • Set a wrong default value like 'nocolor'

Expected result

An error should be shown that the field could not be saved.

Actual result

An error should be shown that the field could not be saved.

avatar laoneo laoneo - open - 28 Mar 2017
avatar laoneo laoneo - change - 28 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Libraries Front End Plugins
avatar laoneo laoneo - change - 28 Mar 2017
Title
[com_fields"Use the color rule for the color field
[com_fields] Use the color rule for the color field
avatar laoneo laoneo - edited - 28 Mar 2017
avatar laoneo laoneo - change - 28 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Libraries Front End Plugins Administration com_fields Libraries Front End Plugins
avatar laoneo laoneo - change - 28 Mar 2017
The description was changed
avatar laoneo laoneo - edited - 28 Mar 2017
avatar laoneo
laoneo - comment - 28 Mar 2017

Thanks @brianteeman. I had to change the whole doc block as it was very outdated and did contain invalid information.

avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Libraries Front End Plugins Administration com_fields Administration com_fields Libraries Front End Plugins Unit Tests
avatar laoneo laoneo - change - 28 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Libraries Front End Plugins Administration com_fields Unit Tests Administration com_fields Front End Plugins
avatar laoneo laoneo - change - 28 Mar 2017
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2017
Category Front End Plugins Administration com_fields Administration com_fields Libraries Front End Plugins Unit Tests
avatar laoneo laoneo - change - 28 Mar 2017
The description was changed
avatar laoneo laoneo - edited - 28 Mar 2017
avatar Bakual
Bakual - comment - 28 Mar 2017

Additionally the color rule was changed to have the same behavior as the other rules when an empty value is passed and the field is not required. IMO this is not a BC break but a bug fixed, @Bakual, @mbabker and @wilsonge what you guys think?

Should be fine imho. Nothing could break anyway, it just allows an empty value now if the field is not required, which makes sense for a not-required field.

avatar laoneo
laoneo - comment - 28 Mar 2017

If that one got merged, then I will prepare another pr which unify the required check as it is redundant code across all rules. But first let's get that one in first ?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Mar 2017

@laoneo without PR i added in color-field hex value "#000000", Article is saved with #000000

avatar N6REJ
N6REJ - comment - 29 Mar 2017

@franz-wohlkoenig thats black

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Mar 2017

@N6REJ correct*g i referred to:

The article saves with a wrong color value.

so i expect that #000000 got something like #123456

avatar N6REJ
N6REJ - comment - 29 Mar 2017

oh ok, thats not what you said

avatar laoneo
laoneo - comment - 30 Mar 2017

so i expect that #000000 got something like #123456

Why should it be transformed that way? It should keep the value.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Mar 2017

@laoneo thats how i understand "The article saves with a wrong color value."

avatar laoneo
laoneo - comment - 30 Mar 2017

No it doesn't but it will not be possible to save it with invalid colors.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Mar 2017

@laoneo can you give a invalid hex-code to test?

avatar laoneo
laoneo - comment - 30 Mar 2017

You can use any string as invalid hex code which doesn't represent a hex color. I'm not even sure if this can be reproduced with modifying the request as the javascript code is always reverting to a color hex code or is clearing the field when editing the article. I guess at the end of the day it has to be merged by review as the unit tests do all pass.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Mar 2017

so its better for Tester to adapt Test instructions to "code review"?

avatar laoneo laoneo - change - 30 Mar 2017
The description was changed
avatar laoneo laoneo - edited - 30 Mar 2017
avatar laoneo
laoneo - comment - 30 Mar 2017

Ok, updated the test instructions.

avatar laoneo laoneo - change - 3 Apr 2017
Labels Added: ?
avatar laoneo laoneo - change - 3 Apr 2017
The description was changed
avatar laoneo laoneo - edited - 3 Apr 2017
avatar laoneo
laoneo - comment - 3 Apr 2017

As with the merge of #15032 it is now easier to test. Just put in a wrong default value and try to save the field.

avatar brianteeman brianteeman - test_item - 3 Apr 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 3 Apr 2017

I have tested this item successfully on 892c727


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14970.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 3 Apr 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2017

I have tested this item successfully on 892c727

An error is shown that the field could not be saved.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14970.

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Apr 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2017

RTC after two successful testes.

avatar laoneo
laoneo - comment - 3 Apr 2017

Thanks, guys!

avatar rdeutz rdeutz - change - 4 Apr 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-04-04 19:06:24
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 4 Apr 2017
avatar rdeutz rdeutz - merge - 4 Apr 2017

Add a Comment

Login with GitHub to post a comment