Menu

Cannot create tasks in 3.3.1

Help
fazerman
2006-03-13
2013-04-08
  • fazerman

    fazerman - 2006-03-13

    Hi,

    I installed v3.3.1 from scatch (Windows XP, Wamp5 v1.6.1).
    I can't create task as a developer : I'm not able to (the word is cross out)! Even in a story (in the current iteration or not) or as isolated task
    I can as a admin or a coach...and as a developer, I can create story.

    What happen ?

     
    • Michael L Phillips

      Hi there,

      You should be able to change this by logging in as admin, then modifying the Profile settings for the Developer profile.

      I haven't tried it myself, but try changing the "insert" entry in the Task section from the default value of "my". Try changing it to "proj" or "all".

      Hope this helps...

      Mike.

       
      • Olivier Chirouze

        Thanks Mike.

        Actualy he was right: this is a bug. I just managed to see it too. Even with the "my" option, you must be able to insert, but only with your name.

        Here's the fix: find file /Model/Planning_model.inc.php

        Go to line 792, and replace the whole "isAllowedToInsert" block by this:

        function isAllowedToInsert() {
                       
                // allowed to insert for any project, or...
                // ...to insert with his name AND on this project
                return @($this->isAllowedToInsertAll()
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["my"] && $this->isFromMember($GLOBALS["gConnectedUser"]->id))
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["proj"] && $GLOBALS["gConnectedUser"]->isMemberOf($this->projectId)));

            }

        Thanks for noticing, I'll include the fix in the next release...

        Olivier

         
    • fazerman

      fazerman - 2006-03-13

      Hi Mike,

      you're right ! It's working now !
      Thank's a lot.

      But this is a walk around. The help says, for task insert with 'my' as value, 'The user can create tasks, but he will necessarily be responsible for it.'. So, a developer role normally can create a task (with 'my' as value)... BUG ?

      Didier.

       
    • Michael L Phillips

      Hi Didier,

      Hmm, yes, I see what you mean. The Help page certainly implies that the "my" option should allow the member to create tasks.

      I guess only the developer will be able to tell us if this is a bug...Olivier? What do you think? :)

      Mike.

       
    • Olivier Chirouze

      Funny to see I actualy answered at the very same time while you posted your two new messages and we all agree to the same conclusion... that was a bug :o)

      Olivier

       
    • Michael L Phillips

      Yes, we all came to the same conclusion, but only you knew how to fix it! :)

      Thanks Olivier.

      Mike.

       
    • Olivier Chirouze

      Well, I'm also the only one who created the bug!
      ;-)

      Olivier

       
    • fazerman

      fazerman - 2006-03-14

      Hi there,

      OK for the fix. It's working. As a developer with 'my' in my task profile, I can add a task.

      BUT, I can't modify nor delete it ! I have to change to 'proj' to be able to do that.

      In short, the same problem as creating a task occurs for modifing or deleting one.

      The code seems to be OK...

      What's wrong ?

      Didier.

       
      • Olivier Chirouze

        With the full solution, it's working better ;-)

        Sorry about that. I actually fixed everything but sent you only half of it!

        Here you should replace whole lines 770 to 815 (function isAllowedToDelete to isAllowedToInsertIfResponsible) with this:

        function isAllowedToDelete() {
               

                //echoDebug($this->id."{isAllowedToDelete} ".$this->memberId." / ".$GLOBALS["gConnectedUser"]->id);

                // If is allowed to delete parent stories and iterations,
                // means is allowed to delete tasks...
                return @($GLOBALS["gConnectedUser"]->rights["task"]["delete"]["all"]
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["delete"]["my"] && $this->isFromMember($GLOBALS["gConnectedUser"]->id))
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["delete"]["proj"] && $GLOBALS["gConnectedUser"]->isMemberOf($this->projectId)));
            }
           
            function isAllowedToUpdate() {
               
                return @($this->isAllowedToUpdateAll() || ($GLOBALS["gConnectedUser"]->rights["task"]["modify"]["my"] && $this->isFromMember($GLOBALS["gConnectedUser"]->id)));
            }
           
            function isAllowedToUpdateAll() {
               
                return @($GLOBALS["gConnectedUser"]->rights["task"]["modify"]["all"] || ($GLOBALS["gConnectedUser"]->rights["task"]["modify"]["proj"] && $GLOBALS["gConnectedUser"]->isMemberOf($this->projectId)));
            }
           
            function isAllowedToInsert() {
                       
                // allowed to insert for any project, or...
                // ...to insert with his name AND on this project
                return @($this->isAllowedToInsertAll()
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["my"] && $this->isFromMember($GLOBALS["gConnectedUser"]->id))
                    || ($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["proj"] && $GLOBALS["gConnectedUser"]->isMemberOf($this->projectId)));

            }
           
            function isAllowedToInsertAll() {
               
                return @($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["all"] || ($GLOBALS["gConnectedUser"]->rights["task"]["insert"]["proj"] && $GLOBALS["gConnectedUser"]->isMemberOf($this->projectId)));
            }
           
            function isAllowedToInsertIfResponsible($memberId) {
                if ($this->isAllowedToInsert()) {
                    return true;
                } else {
                    // not allowed but maybe if he's the responsible?
                    $this->memberId = $memberId;
                    //$this->memberName = $memberName;
                    return $this->isAllowedToInsert();
                }
            }

        Olivier

         
    • fazerman

      fazerman - 2006-03-14

      Hi Olivier,

      thank's for all.
      I tested and it's OK. And the fix arrive quickly...

      You're making a great work on XPWeb...Thanks for that.

      Didier.

       
      • Olivier Chirouze

        Thanks for your support.

        If only I could do this for living ;-)

        Olivier

         
        • Michael L Phillips

          Just out of interest -  Olivier, what *do* you do for a living? I presume you're a software writer, but I guess not in PHP?

          Hope you don't mind me being curious :)

          Michael.

           
          • Olivier Chirouze

            I surely don't mind. I don't know if this should be discussed in this forum, though ;-)

            Let's say I'm a software engineer working in France, but more with Java J2EE / C++ than PHP (which I don't really mind, actually).

            I wish I could work for myself and do it the way I want (ie. more XPish than now), for products I choose, but to be honnest I would not do it in PHP!

            Anybody interested in creating XPWeb Inc.? ;-)

            Olivier

             
            • Michael L Phillips

              Ah, cool, that's interesting. Thanks Olivier.

              XPWeb Inc. sounds good, except for that annoying GNU  GPL license ;-)

              Mike.

               
              • Olivier Chirouze

                Hmm.. you're right. God dawn licence.

                What about that:
                - keep trying to make XPWeb the best I could so it becomes the only option available for XPers.
                - wait for XP to rule the world (only a question of months now)
                - then start making XPWeb more and more complicated to use so that nobody understands it anymore.

                THEN:
                - write a book "XPWeb for dummies"
                - create a XPWeb coaching corporation for people who cannot use XPWeb by themselves.

                And... become rich!!

                Olivier

                 

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.