Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Search API does not respect my timezone visibility?

Piotr Paweł Bogacz
Contributor
May 18, 2021

We have an app that invokes the search API from the UI to search issues with worklogs.

  • POST /rest/api/2/search
    • fields: [project, worklog, key, priority,...]
    • jql: "worklogDate >= 2021-04-30 AND worklogDate <2021-06-02"
    • maxResults: 100
    • startAt: 0

 

You need two accounts:

User #1 - is not owned by organization, Time zone = Europa/Warsaw

User #2 - must be owned and managed by an organization, Time zone = Europa/Warsaw, Local time is visible to people who belong to the same organization

Steps to reproduce:

  1. Setup Jira Cloud by User #1
  2. Change Jira settings - set "Default user time zone" = "(GMT-08:00) Los Angeles"
  3. Invite User #2 to new Jira Cloud
  4. Login as User #2
  5. Create ticket
  6. Log work, time spent = 1h, Date started = 01 May 2021 6:00 AM
  7. Search API invoked from plugin returns:

search.png

Expected result:
Author of worklog is User #2 and he used plugin so timeZone should be "Europe/Warsaw".


Actual result:
Default user time zone is used.

NOTE:
The same search request invoked from Postman returns correct results.

 

Do you think it's a bug?

1 answer

0 votes
Michael Henrys _TechTime_
Contributor
December 6, 2023

How are you making the request to the search API? Apps are generally unable to access the users timezone unless it is public. However they would can access it a frontend context using AP.user.getTimeZone

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events