#3478 add date custom field
Merged by pingou. Opened by karsten.
karsten/pagure issue-3410  into  master

Download 3478.patch

Fixes: https://pagure.io/pagure/issue/3410
This adds a date entry to the pulldown menu in custom fields
clicking on it while modifying metadata of issues allows to pick a date.

Signed-off-by: Karsten Hopp karsten@redhat.com

1 new commit added

  • use date type

Please use space rather than tabs :)

1 new commit added

  • use spaces instead of tabs

Looks like we can format it and put indentation here.

Meaningful variable name here please :smile:

Is it absolutely necessary to use None?

None has been used here ^^^ before, that's the only reason I've used it, too

rebased onto eb9c22e267049ae754a8c651a944a072b64a9a7c

is the console log required?

only for the review to show that the class that hides the element got removed

rebased onto 780ba91b58ca5fc753fd3c924f54d5ea3b30dd57

rebased onto 7afdb19d199eaba30c7f1090dec5645a46bd8ec1

rebased onto b0441d6097fe910a31b79eb1eecf3b369d1fcd4b

There is something odd here, the value of the date field is filled in the settings page or in the ticket that gets this field?

From my local testing, it asks for a value (though doesn't enforce it) in the settings page, while I would expect that the value (thus the calendar widget) shows up when I try to set it in the issue page, no?

rebased onto 2a70e2d082cefb8f7627fbf4ba38ec6ce013608b

It looks like it was rebase but I don't think my previous comment was addressed, was it? (I may be missing it)

No, I've worked on the /pull-request/ready stuff as that had priority

rebased onto cecce7fe094ebed0891fbfbc66c26306fdf432d7

rebased onto cecce7fe094ebed0891fbfbc66c26306fdf432d7

rebased onto 3b79a954adb389516b0f30bd05902c875943d3d3

rebased onto ef30f2487668e8d17f3e12b73469885836749fc4

Test passed, please review.
I've removed the date input field from the settings page and moved it to the issues metadata tab.

rebased onto 4eb08f8ff3e6d3c514f5e6f5abe83420bcd3bc0b

I'm confused about these two lines

rebased onto 570d9fb9a552ad84f5ca5ae645bb6de2ea913d7d

I'm confused about these two lines

They make sure that at least an empty string gets returned, otherwise you'll get failures in pagure/lib/__init__.py around line 4773 when the number of data entries doesn't match the number of types entries.

We could drop the title, class and if the key_type is not a list, is there a reason to do the join(', ') ?

Shouldn't we use elif instead of if/else/if/else ?

I'd drop the title if this is hidden, same for the css class.
The value could also likely be simplified to {% field.data or "" %}

I've changed that to "{{ field.data or '' }}". The css classes needs to stay, otherwise the input filed has the wrong size when you switch from one key_type to 'list'

I've dropped the 'Date' stuff completely, not required here

title and class need to stay, otherwise you won't get the input field mouseover hint and the wrong field size when you create a text field, press update and then decide to change that to 'list'

rebased onto 136079dd371ec6a56045466ef19f388773cb80d3

1 new commit added

  • modify test for the fixed notify button class

rebased onto 24a59a91e9107a8151ee1054220b378d130ead3f

Looks all good and jenkins is happy to, the only thing I see is: The format when adding the date is MM/DD/YYYY while it's shown as yyyy-dd-mm ? Could we change the input field? (Even if only to YYYY/MM/DD)

If not, I'll merge as is :)

Unfortunately not that easily. Most browsers show a calender picker widget where this doesn't matter. Your browser doesn't seem to support that and what text is shown depends on the browser and language settings.

Your browser doesn't seem to support that and what text is shown depends on the browser and language settings.

It does show the calendar widget but the place holder is US format unlike what we display.

If it's related to the browser and language settings then I'm fine. Let's get this in :)

Actually, is this change still needed?

rebased onto 136079dd371ec6a56045466ef19f388773cb80d3

rebased onto 28e12455035cfd781248b353195538fbb9b8fd4b

rebased onto 063ec08b930ef78949255760c971b100172489c6

I've adjusted this PR a little bit (tests were failing) and I squashed all commits into one.
I'm running the tests locally and if they pass, I'll merge :)

Thanks @karsten for your work on this! :)

Pull-Request has been merged by pingou

Metadata