Skip to main content
Topic: Maillist Email Parser and Email Filter will save without a proper name (Read 2618 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Maillist Email Parser and Email Filter will save without a proper name

Smallish bug. When saving a new Email Filter or Email Parser the filter or parser does not test for the presence of a proper name and will save the filter or parser with a null name. The filter or parser is editable and deletable but has no name.  The Bounce Templates do not exhibit this same problem.

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #1

Yup ... the name is only to help the admin remember what the filter was intended for, its not used by the code per se

We could enforce having a name, but it was intended to be optional ... maybe just use N/A if no name is provided?

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #2

I am kind of an old skool type of guy; even my dog has a name.  :)

The look and feel calls for a name to be there. I will guess that the bulk of Admins in life using Elkarte will probably not be as sharp as you guys here. They will instantly notice and question why there is no name there. Humans are like that, they notice this kind of stuff then ask about it or report it as a problem; all when the programmers made something intentional.

The N/A is sort of skippy to me. I noticed it being used in the Maillist Template Preview section when an Admin fails to enter a template name and N/A is presented in the template preview heading. Honestly, I felt it looked out of place and awkward. I actually looked to change that but I found the N/A string is common to a few other things so that was out of the question.

In the case of the Maillist Template Preview I would say to test for the name and if there then show the name in the heading. If no name were entered then I would leave the heading empty and use the warning box to alert there is an issue. When the Admin corrects the issue then the success box is there and the template name is shown in the heading.

Sorry mixing two topics there but they are both in the Maillist so I got a bit verbose.  :)   

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #3

The template preview does warn that you need to set a title ...  but it goes ahead with the preview and uses N/A for the title.  It does not make sense to me to block the preview until you enter one.

On naming the filter,  I'm not fond of requiring information that is not actually needed/used, and its not like you can't go and enter a name if the blank one is a bother.  I could also simply remove the column ;)  but I really added it since when you do a more complex regex filter, its nice to label it with what it was for.   If you really want to require it, PR's are welcome.

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #4

I may have worded that poorly but yes, I do realize the warning is given when no name is present. I was thinking along the lines that when the warning is given, N/A or really nothing would be put into the heading.

I am fine with it like it is but was looking at the display from a perspective that probably only my mind would come up with.  :)  Probably a skewed perspective.

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #5

Quote from: Spuds – The template preview does warn that you need to set a title ...  but it goes ahead with the preview and uses N/A for the title.  It does not make sense to me to block the preview until you enter one.

On naming the filter,  I'm not fond of requiring information that is not actually needed/used, and its not like you can't go and enter a name if the blank one is a bother.  I could also simply remove the column ;)  but I really added it since when you do a more complex regex filter, its nice to label it with what it was for.  If you really want to require it, PR's are welcome.
I have thought about this over night  and this has already failed your 'sniff' test. Judging from your response here and yours and anothers in the Package thread, I am not properly expressing myself or making my 'concept' clear. In life, I advise. I do not force. My concept is not your concept. I am good with that. There are professional, well thought out looks to a GUI that users recognize. I find that core programmers often miss that look because they are focused on the core.

This is not my software, I like it but it is not mine nor is it my place to push a PR just to get my way.

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #6

One option (that may help or may just irritate, depends on the person), could be if the name field is empty, use the first...20 chars of the text as title.
Many are kind of used to expect this behaviour (see for example how MS Word uses the first sentence or title of the first page as "suggested" name of the file on saving a new one).
Bugs creator.
Features destroyer.
Template killer.

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #7

I'll be the annoyed party :P

Here is one of my filters
Code: [Select]
~\s+(> )?(\[hr\]|-{36})(\s|<br>|<br />).*? Links:.*(\<|<)\*(\>|>).*\[[a-z0-9]{32}\-(p|t|m)(\d+)\]~s

So use the first 20 characters as the name, \s+(> )?(\[hr\]|-{3  not sure that looks better than blank :P

Re: Maillist Email Parser and Email Filter will save without a proper name

Reply #8

xD

Ok, I guess I'm not sure what I'm talking about. LOL
Bugs creator.
Features destroyer.
Template killer.