1. 22 Feb, 2018 1 commit
  2. 07 Sep, 2017 1 commit
  3. 03 Aug, 2017 1 commit
    • to1ne's avatar
      Add workaround for UPDATE with subquery when using MySQL · a488fc0a
      to1ne authored
      When trying to run an UPDATE, this query is ran:
      
      ```sql
      UPDATE `todos`
      INNER JOIN `projects` ON `projects`.`id` = `todos`.`project_id`
      SET `todos`.`state` = 'done'
      WHERE `todos`.`user_id` = 4
        AND (`todos`.`state` IN ('pending'))
        AND (EXISTS
               (SELECT 1
                FROM `project_authorizations`
                WHERE `project_authorizations`.`user_id` = 4
                  AND (project_authorizations.project_id = projects.id))
             OR projects.visibility_level IN (10,
                                              20))
        AND `projects`.`id` IN
          (SELECT `todos`.`project_id`
           FROM `todos`
           WHERE `todos`.`user_id` = 4
             AND (`todos`.`state` IN ('pending')))
        AND (`todos`.`state` != 'done')
      ```
      
      But MySQL does not like the subquery used to filter on
      `projects.id IN (SELECT ...`
      
      Because the subquery queries from the same table:
      
      > Error: You can’t specify target table ‘todos’ for update in FROM clause
      
      So as workaround, wrap it in another subquery, where the original
      subquery is aliased using the `AS` statement.
      
      Mostly inspired by https://stackoverflow.com/a/43610081/89376
      a488fc0a
  4. 28 Jun, 2017 2 commits
  5. 02 Jun, 2017 1 commit
  6. 06 Apr, 2017 1 commit
    • jacopo's avatar
      ProjectsFinder should handle more options · b996a82f
      jacopo authored
      Extended ProjectFinder in order to handle the following options:
       - current_user - which user use
       - project_ids_relation: int[] - project ids to use
       - params:
         -  trending: boolean
         -  non_public: boolean
         -  starred: boolean
         -  sort: string
         -  visibility_level: int
         -  tags: string[]
         -  personal: boolean
         -  search: string
         -  non_archived: boolean
      
      GroupProjectsFinder now inherits from ProjectsFinder.
      Changed the code in order to use the new available options.
      b996a82f
  7. 21 Mar, 2017 1 commit
  8. 20 Mar, 2017 1 commit
  9. 23 Feb, 2017 2 commits
  10. 30 Aug, 2016 1 commit
  11. 19 Aug, 2016 1 commit
  12. 15 Aug, 2016 2 commits
  13. 12 Aug, 2016 1 commit
    • Rémy Coutable's avatar
      Support slash commands in noteable description and notes · 0eea8c88
      Rémy Coutable authored
      Some important things to note:
      
      - commands are removed from noteable.description / note.note
      - commands are translated to params so that they are treated as normal
        params in noteable Creation services
      - the logic is not in the models but in the Creation services, which is
        the right place for advanced logic that has nothing to do with what
        models should be responsible of!
      - UI/JS needs to be updated to handle notes which consist of commands
        only
      - the `/merge` command is not handled yet
      
      Other improvements:
      
      - Don't process commands in commit notes and display a flash is note is only commands
      - Add autocomplete for slash commands
      - Add description and params to slash command DSL methods
      - Ensure replying by email with a commands-only note works
      - Use :subscription_event instead of calling noteable.subscribe
      - Support :todo_event in IssuableBaseService
      Signed-off-by: Rémy Coutable's avatarRémy Coutable <remy@rymai.me>
      0eea8c88
  14. 12 Jul, 2016 2 commits
  15. 01 Jul, 2016 1 commit
  16. 17 Jun, 2016 1 commit
  17. 16 Jun, 2016 2 commits
  18. 14 Jun, 2016 1 commit
  19. 03 Jun, 2016 2 commits
  20. 02 Jun, 2016 5 commits
  21. 17 May, 2016 1 commit
    • Sean McGivern's avatar
      Create a todo on failing MR build · 6b834f2c
      Sean McGivern authored
      When a build fails for a commit, create a todo for the author of the
      merge request that commit is the HEAD of. If the commit isn't the HEAD
      commit of any MR, don't do anything. If there already is a todo for that
      user and MR, don't do anything.
      
      Current limitations:
      - This isn't configurable by project.
      - The author of a merge request might not be the person who pushed the
        breaking commit.
      6b834f2c
  22. 20 Feb, 2016 2 commits