Menu

#18 Filter Perforce changelists by description

1.1.0
closed
8
2011-06-08
2011-05-11
No

Background

When a user wants to add some Perforce changelists (implementation parts) to an i.e. TRS, he currently needs to
browse through hundreds of them, as the filtering capabilities of the "Add P4 Changelists" dialog are currently
limited to branch and user only.

It is required to provide additional filtering capabilities, for example, by a task name which the ticket belongs to. This info
is stored in a changelist's description.

Steps to implement

1. Extend AddP4ChangeDialog as follows:

- add new label and a text field:
- Text in description (wildcards accepted): [......................]
- the label "Text in description (wildcards accepted):" must be located right below the
"P4 depot path:", left-aligned with it.
- the text field must be expanded right to the "Refresh" button (see below)
- move the button "Refresh" to the row with the newly-added text field
- after all changes, the top part of the window should look as follows:

P4 depot path: [............] Nbr. of changelists to show: [........]
Text in description (wildcards accepted): [...............] [Refresh]
[x] Disable changelists that are already added

2. Extend AddP4ChangeController as follows:

- add new String-field to store the description-filter text
- add getter/setter for it
- this field should store the text which can possibly contain wildcards ('*' and '?'), examples:
- *NAV2010ANA-1747* - would select all CLs having the string "NAV2010ANA-1747" in their description
- *TRS: T03?7* - would select all CLs having the string "TRS: T0307", "TRS: T0317", ..., "TRS: T03z7", ... in their description
- extend method getChangelists():
- each of Change[] changes should be checked - if the particular CL's description matches the regular expression
defined by description filter text
- use WildcardRegex class to convert from wildcard- to regexp-syntax
- return only those changes whose descriptions match the filter
- but still return all changes is filter text is an empty string
- please do not do all this directly in getChangelists(), but introduce a separate method to perform the filtering of the changes-array

Verification criteria

- Perforce changelists are filtered according to the textual filter expression
- The Perforce changelists which are already assigned are shown in a disabled state, as it is now
- The selected Perforce changelists are stored into DB and the traceability matrix report is updated correspondingly
- in the same session and after application restart

Discussion

  • Aleksandr

    Aleksandr - 2011-05-20

    Fixed

     
  • Aleksandr

    Aleksandr - 2011-06-03

    CL Filter was refactored

     
  • Sergey Borodavkin

    Verified

     
  • Sergey Borodavkin

    Fixed

     
  • Sergey Borodavkin

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB