Topic: Small issue with Default Category when new event is created

Hey there,

Just updated to the current version, as always, awesome job with the calendar and thank you so much for having it available.

Here's the snag:

If I have a number of different categories, and a user select one category to be displayed, when they go to create a new event, it auto-populates the category with the category that is one up in the list.

ie:

I have
Fishing
Boating
Camping

as categories. If I select Boating as the display, then any new events automatically get the category of Fishing. If I do Camping, the new events get Boating.

This is a small small thing, but I have a user that constantly posts things in the wrong category.

Is there a way to set it so that if a specific category is being displayed, that any new events also get that category?

I really appreciate your help and the time you've spent on this, keep up the great work!

David

Re: Small issue with Default Category when new event is created

It would be great if a user could have a specific category set the default for a new event in the user settings...that would completely address the issue.

Re: Small issue with Default Category when new event is created

Hi there,
When in the Options Panel you have selected only one category, then when adding a new event the default category will always be the category selected in the Options Panel. When more, or all, categories have been selected in the Options panel, the default category is the first in the drop-down menu.

The possibility to specify a default category per user would indeed address the issue. I think however a default category should be put in the user groups, Why? Because in the user groups you can already specify which categories a user in a particular group can see and add/edit.
If then you want a user (or group of users) to add events in a specific category, you can create a dedicated user group for them.
Would that solve your issue?
Roel

4 (edited by AdamsTNT 2024-04-22 17:53:06)

Re: Small issue with Default Category when new event is created

What you are recommending with the user groups would probably sort the issue nicely.

And I agree with what you are saying the behavior should be if you have only one category selected...but that isn't what we're seeing.

Right now the category in the new events that is auto-selected is always one above the one they are viewing...is it possible I have a setting messed up? If others aren't seeing this behaviour then I may be stuck...I've gone through the settings and everything looks reasonable to me.

Regardless, I really appreciate you taking the time to help with this smile

Have a great week!

David

Re: Small issue with Default Category when new event is created

Hi David,
I checked again our test calendars. When I select one single category in the Options Panel and thereafter open the Event window to add a new event, the default category in the Category drop-down menu is the category selected in the Options Panel. Apparently this is not what you are experiencing, which is surprising. In particular because I also checked the PHP code and see that when one single category is selected it definitively takes this category as default when adding a new event.
Are you using the latest calendar version 5.3.2?
Would it be possible to send me the URL of your calendar (by email) and create a temporary account for me with admin rights?
Roel

Re: Small issue with Default Category when new event is created

Hey there,

I have sent you an email with an admin login. *twitch* *twitch* and the calendar url

Version is the current one, 5.3.2M I believe.

Despite the twitching, thank you so much for trying to help resolve this for us smile

Re: Small issue with Default Category when new event is created

Thank you Sir!

With the recommended change you suggesated all is working perfectly. Wishing you an absolutely fantastic week, thank you again smile

David

Re: Small issue with Default Category when new event is created

For those having the same issue, this is the solution.
Edit the file "common/header.php" and on line 306 replace the first word "sequence" by "ID". So the line should look as follows:

  $stH = dbQuery("SELECT `name`,`ID`,`color`,`bgColor` FROM `categories`".$where." ORDER BY `sequence`");

Roel