Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Custom date format is not applied after browser restart #2075

Open
atomicsp opened this issue Jun 9, 2021 · 8 comments
Open

[Bug] Custom date format is not applied after browser restart #2075

atomicsp opened this issue Jun 9, 2021 · 8 comments
Labels
bug cannot reproduce TheHive4 TheHive4 related issues
Milestone

Comments

@atomicsp
Copy link

atomicsp commented Jun 9, 2021

Request Type

Bug

Work Environment

Question Answer
OS version (server) CentOS
OS version (client) Windows 10
Virtualized Env. True
Dedicated RAM N/A
vCPU N/A
TheHive version / git hash 4.1.4-1
Package Type From source
Database Cassandra
Index type N/A
Attachments storage Local
Browser type & version Firefox and Chrome

Problem Description

The custom date made possible in 1583 is not applied until you click "organization" in the upper right corner.

Steps to Reproduce

  1. Define a custom date format under organization, click save
  2. Restart browser
  3. Log in to Thehive
  4. Look at the date format in e.g. case list, this is the default format, and not the one defined in step 1.
  5. Click "organization"
  6. Go back to case list, the format has changed.
@atomicsp atomicsp added bug TheHive4 TheHive4 related issues labels Jun 9, 2021
@nadouani
Copy link
Contributor

Hello @atomicsp, I wasn't able to reproduce this behavior. Can you please provide a screencast showing the issue?

How do you restart the browser? just closing and reopening a new window?

@atomicsp
Copy link
Author

You need to restart the browser (or just try the bug while using incognito/private browsing) to make sure you do not have data stored locally.
New windows or tabs will not reproduce it.

I have attached screen shots of:

  1. right after login
  2. Looking at the settings under organization (I do not click anything here)
  3. Looking at the case list.

As you can see, the date magically changes to the correct format in step 3.
bug

@nadouani
Copy link
Contributor

This looks like a browser cache issue. Let me try with a browser where the cache is not disabled. Thanks for the details

@nadouani
Copy link
Contributor

Again, I'm unable to reproduce it unfortunately

date-format.mp4

@nadouani
Copy link
Contributor

When updating the data format from the UI, you should see the following API calls:

Screenshot 2021-06-11 at 12 52 34

The first one sets the format, the second one refreshes the configuration by getting the new values.
Can you share the result of these two API calls?

@atomicsp
Copy link
Author

The steps you show work on my system as well.
But after you set the format as shown in your video, restart your browser and take a look at the case list format.
I'll try to provide more details and video next week if this doesn't reproduce it.

@mphbig
Copy link

mphbig commented Jun 15, 2021

Hello,

Same issue on 4.1.5, asking my colleagues to open https://hive.com/api/config/organisation?path=ui in a new tab allowed them to get the right date format on TheHive. Even a CTRL+F5 didn't solve the issue. My colleagues use Chrome and Firefox.

@androssfox
Copy link

Having a very similar issue, also in 4.1.5, using Firefox and Chrome.

It seems that /organisation?path=ui is not being called consistently on login or organisation change, causing the custom format and tag colours to fail:

  • On login page, it gets requested but returns a 401 (as you are not logged in yet). After entering credentials it is not requested again, so the the custom date format and tag colours are not loaded/working.

  • On changing organisations, the request is also not made, so the custom date format and tag colours remain from the previous organisation, not loading the new organisations' custom date / tag colours.

Both situations are fixed by pressing F5 or opening a new tab, as the request /organisation?path=ui gets called again.

This also causes issues with other organisation configuration parameters, such as "Hide Empty Cases Button", which is not enforced until F5 is pressed or new tab is opened, allowing users to create cases even if it is checked.

@nadouani nadouani added this to the 4.2.0 milestone Jun 15, 2021
@nadouani nadouani modified the milestones: 4.2.0, Backlog Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cannot reproduce TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

4 participants