Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23733

The delete button in section view/list should be disabled if the section can not be removed

    Details

      Description

      A section can not be removed if it's assigned to some contents OR it is used in some roles.

        Issue Links

          Activity

          Damien Pobel (Inactive) created issue -
          Damien Pobel (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Damien Pobel (Inactive) made changes -
          Assignee Yannick Roger [ yannick.roger@ez.no ]
          Yannick Roger (Inactive) made changes -
          Link This issue is blocked by EZP-23738 [ EZP-23738 ]
          Damien Pobel (Inactive) made changes -
          Labels adminui
          Yannick Roger (Inactive) made changes -
          Fix Version/s Engineering tracked issues [ 11179 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 65344 ] EZ* Development Workflow [ 70275 ]
          Hide
          Gunnstein Lye added a comment -

          Is this really blocked by EZP-23738 "Permissions UI granularity"? The section controller is already checking the number of content objects assigned to each section, we just need to add the count for roles using each section. The gateway has a `countContentObjectsInSection($id)`, it should be easy enough to add a `countRolesUsingSection($id)`. What say you [~yannick.roger@ez.no]...?

          Show
          Gunnstein Lye added a comment - Is this really blocked by EZP-23738 "Permissions UI granularity"? The section controller is already checking the number of content objects assigned to each section, we just need to add the count for roles using each section. The gateway has a `countContentObjectsInSection($id)`, it should be easy enough to add a `countRolesUsingSection($id)`. What say you [~yannick.roger@ez.no] ...?
          Hide
          Yannick Roger (Inactive) added a comment -

          It's been a while And my code has been refactored since I opened this issue.

          You can have a look with today's architecture. Just keep in mind the performances as this is a list and it can contain a certain number of items so the count must be quite optimized.

          Show
          Yannick Roger (Inactive) added a comment - It's been a while And my code has been refactored since I opened this issue. You can have a look with today's architecture. Just keep in mind the performances as this is a list and it can contain a certain number of items so the count must be quite optimized.
          Hide
          Gunnstein Lye added a comment -

          Right, it's nearly time for the 1st year anniversary Ok, I'll try out my theory. The section list isn't paginated yet, but that's a separate story and fixing this bug now won't make that any harder I think.

          Show
          Gunnstein Lye added a comment - Right, it's nearly time for the 1st year anniversary Ok, I'll try out my theory. The section list isn't paginated yet, but that's a separate story and fixing this bug now won't make that any harder I think.
          Gunnstein Lye made changes -
          Assignee Yannick Roger [ yannick.roger@ez.no ] Gunnstein Lye [ gunnstein.lye@ez.no ]
          Gunnstein Lye made changes -
          Status Confirmed [ 10037 ] Backlog [ 10000 ]
          Gunnstein Lye made changes -
          Status Backlog [ 10000 ] Development [ 3 ]
          Gunnstein Lye logged work - 29/Oct/15 10:00 AM
          • Time Spent:
            4 hours
             

            .

          Gunnstein Lye made changes -
          Summary The checkbox on the section list should be disabled if the section can not be removed The delete button in section view/list should be disabled if the section can not be removed
          Show
          Gunnstein Lye added a comment - - edited PR: https://github.com/ezsystems/ezpublish-kernel/pull/1493 https://github.com/ezsystems/PlatformUIBundle/pull/415
          Gunnstein Lye made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 4 hours [ 14400 ]
          Worklog Id 57512 [ 57512 ]
          Gunnstein Lye made changes -
          Fix Version/s 2015.09.2 [ 14487 ]
          Original Estimate 0 minutes [ 0 ]
          Affects Version/s 2015.09.1 [ 14486 ]
          Gunnstein Lye made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Gunnstein Lye logged work - 30/Oct/15 10:00 AM
          • Time Spent:
            30 minutes
             

            .

          Petar Spanja (Inactive) logged work - 30/Oct/15 3:24 PM
          • Time Spent:
            1 hour, 20 minutes
             

            review

          Gunnstein Lye made changes -
          Time Spent 4 hours [ 14400 ] 4 hours, 30 minutes [ 16200 ]
          Worklog Id 57532 [ 57532 ]
          Petar Spanja (Inactive) made changes -
          Time Spent 4 hours, 30 minutes [ 16200 ] 5 hours, 50 minutes [ 21000 ]
          Worklog Id 57673 [ 57673 ]
          Gunnstein Lye logged work - 17/Nov/15 10:00 AM
          • Time Spent:
            2 hours
             

            .

          Gunnstein Lye made changes -
          Time Spent 5 hours, 50 minutes [ 21000 ] 7 hours, 50 minutes [ 28200 ]
          Worklog Id 57814 [ 57814 ]
          Gunnstein Lye made changes -
          Fix Version/s 2015.09.2 [ 14487 ]
          Gunnstein Lye logged work - 24/Nov/15 11:00 AM
          • Time Spent:
            2 hours
             

            .

          Gunnstein Lye made changes -
          Time Spent 7 hours, 50 minutes [ 28200 ] 1 day, 1 hour, 50 minutes [ 35400 ]
          Worklog Id 57875 [ 57875 ]
          Gunnstein Lye logged work - 26/Nov/15 10:00 AM
          • Time Spent:
            2 hours
             

            .

          Gunnstein Lye made changes -
          Time Spent 1 day, 1 hour, 50 minutes [ 35400 ] 1 day, 3 hours, 50 minutes [ 42600 ]
          Worklog Id 57906 [ 57906 ]
          Gunnstein Lye logged work - 27/Nov/15 2:30 PM
          • Time Spent:
            2 hours
             

            .

          Gunnstein Lye made changes -
          Time Spent 1 day, 3 hours, 50 minutes [ 42600 ] 1 day, 5 hours, 50 minutes [ 49800 ]
          Worklog Id 57945 [ 57945 ]
          Gunnstein Lye logged work - 30/Nov/15 11:00 AM
          • Time Spent:
            2 hours
             

            .

          Gunnstein Lye made changes -
          Time Spent 1 day, 5 hours, 50 minutes [ 49800 ] 1 day, 7 hours, 50 minutes [ 57000 ]
          Worklog Id 57953 [ 57953 ]
          Gunnstein Lye logged work - 01/Dec/15 10:00 AM
          • Time Spent:
            1 hour
             

            .

          Show
          Gunnstein Lye added a comment - Merged in master: https://github.com/ezsystems/ezpublish-kernel/commit/1d867c1ce749a801402fb3aecc40992844e20a8a https://github.com/ezsystems/PlatformUIBundle/commit/a9c69ee78ada0abbc5ea87534472438da141188c
          Gunnstein Lye made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Assignee Gunnstein Lye [ gunnstein.lye@ez.no ]
          Gunnstein Lye made changes -
          Time Spent 1 day, 7 hours, 50 minutes [ 57000 ] 2 days, 50 minutes [ 60600 ]
          Worklog Id 57960 [ 57960 ]
          Rui Silva (Inactive) made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Gunnstein Lye made changes -
          Link This issue relates to EZP-25264 [ EZP-25264 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 70275 ] EZEE Development Workflow [ 124424 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          6s 1 damien.pobel@ez.no 03/Dec/14 9:57 AM
          Confirmed Confirmed Backlog Backlog
          329d 23h 44m 1 Gunnstein Lye 29/Oct/15 9:42 AM
          Backlog Backlog Development Development
          2s 1 Gunnstein Lye 29/Oct/15 9:42 AM
          Development Development Development Review Development Review
          4h 45m 1 Gunnstein Lye 29/Oct/15 2:27 PM
          Development Review Development Review Documentation Review done Documentation Review done
          32d 23h 40m 1 Gunnstein Lye 01/Dec/15 2:08 PM
          Documentation Review done Documentation Review done QA QA
          1d 1h 13m 1 rui.silva@ez.no 02/Dec/15 3:21 PM
          QA QA Closed Closed
          36m 20s 1 rui.silva@ez.no 02/Dec/15 3:57 PM

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 50 minutes
                2d 50m